prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add a default Organsiation Logo image
  - [x] Finalise image decision
  - [x] Implement new image
  ## Test plan
  
  GIVEN the organisation directory page
  WHEN an organisation has no logo
  THEN the image as shown below should be displayed
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `akvo/rsr/templatetags/rsr_utils.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 """Akvo RSR is covered by the GNU Affero General Public License.
  3 
  4 See more details in the license.txt file located at the root folder of the Akvo RSR module.
  5 For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
  6 """
  7 
  8 from __future__ import absolute_import, print_function
  9 
  10 from django import template
  11 from django.contrib.auth import get_user_model
  12 from akvo.rsr.models import Keyword, PartnerSite, Project, ProjectUpdate, Organisation
  13 register = template.Library()
  14 
  15 
  16 @register.inclusion_tag('rsr_utils/img.html', takes_context=True)
  17 def img(context, obj, width, height, alt):
  18     """Standard way to show image."""
  19     geometry = '{}x{}'.format(width, height)
  20 
  21     # Based on type get image
  22     img = obj
  23     if isinstance(obj, Project):
  24         img = obj.current_image
  25     elif isinstance(obj, ProjectUpdate):
  26         img = obj.photo
  27     elif isinstance(obj, Organisation):
  28         img = obj.logo
  29     elif isinstance(obj, get_user_model()):
  30         img = obj.avatar
  31     elif isinstance(obj, PartnerSite):
  32         img = obj.logo
  33     elif isinstance(obj, Keyword):
  34         img = obj.logo
  35 
  36     height = '{}.px'.format(height)
  37 
  38     return {'alt': alt,
  39             'height': height,
  40             'img': img,
  41             'geometry': geometry,
  42             'width': width}
  43 
  44 
  45 @register.inclusion_tag('rsr_utils/vid_img.html', takes_context=True)
  46 def vid_img(context, obj, width, height, alt):
  47     """Standard way to show video thumbnail."""
  48     geometry = '{}x{}'.format(width, height)
  49 
  50     # Based on type get video
  51     vid = obj
  52     if isinstance(obj, ProjectUpdate):
  53         vid = obj.video
  54 
  55     height = '{}.px'.format(height)
  56 
  57     return {'alt': alt,
  58             'height': height,
  59             'vid': vid,
  60             'geometry': geometry,
  61             'width': width}
  62
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/akvo/rsr/templatetags/rsr_utils.py b/akvo/rsr/templatetags/rsr_utils.py
  --- a/akvo/rsr/templatetags/rsr_utils.py
  +++ b/akvo/rsr/templatetags/rsr_utils.py
  @@ -8,6 +8,7 @@
   from __future__ import absolute_import, print_function
   
   from django import template
  +from django.conf import settings
   from django.contrib.auth import get_user_model
   from akvo.rsr.models import Keyword, PartnerSite, Project, ProjectUpdate, Organisation
   register = template.Library()
  @@ -16,16 +17,22 @@
   @register.inclusion_tag('rsr_utils/img.html', takes_context=True)
   def img(context, obj, width, height, alt):
       """Standard way to show image."""
  -    geometry = '{}x{}'.format(width, height)
  +    img = ""
  +    geometry = "{}x{}".format(width, height)
  +    default_img = "//placehold.it/{}".format(geometry)
   
  -    # Based on type get image
  -    img = obj
       if isinstance(obj, Project):
           img = obj.current_image
       elif isinstance(obj, ProjectUpdate):
           img = obj.photo
       elif isinstance(obj, Organisation):
  -        img = obj.logo
  +        if obj.logo:
  +            img = obj.logo
  +        else:
  +            default_img = "//{}{}{}".format(
  +                context["request"].get_host(),
  +                getattr(settings, "STATIC_URL"),
  +                "images/default-org-logo.jpg")
       elif isinstance(obj, get_user_model()):
           img = obj.avatar
       elif isinstance(obj, PartnerSite):
  @@ -33,13 +40,10 @@
       elif isinstance(obj, Keyword):
           img = obj.logo
   
  -    height = '{}.px'.format(height)
  -
  -    return {'alt': alt,
  -            'height': height,
  -            'img': img,
  -            'geometry': geometry,
  -            'width': width}
  +    return {"default_img": default_img,
  +            "geometry": geometry,
  +            "img": img,
  +            "alt": alt}
   
   
   @register.inclusion_tag('rsr_utils/vid_img.html', takes_context=True)
  
verification_info: {"golden_diff": "diff --git a/akvo/rsr/templatetags/rsr_utils.py b/akvo/rsr/templatetags/rsr_utils.py\n--- a/akvo/rsr/templatetags/rsr_utils.py\n+++ b/akvo/rsr/templatetags/rsr_utils.py\n@@ -8,6 +8,7 @@\n from __future__ import absolute_import, print_function\n \n from django import template\n+from django.conf import settings\n from django.contrib.auth import get_user_model\n from akvo.rsr.models import Keyword, PartnerSite, Project, ProjectUpdate, Organisation\n register = template.Library()\n@@ -16,16 +17,22 @@\n @register.inclusion_tag('rsr_utils/img.html', takes_context=True)\n def img(context, obj, width, height, alt):\n     \"\"\"Standard way to show image.\"\"\"\n-    geometry = '{}x{}'.format(width, height)\n+    img = \"\"\n+    geometry = \"{}x{}\".format(width, height)\n+    default_img = \"//placehold.it/{}\".format(geometry)\n \n-    # Based on type get image\n-    img = obj\n     if isinstance(obj, Project):\n         img = obj.current_image\n     elif isinstance(obj, ProjectUpdate):\n         img = obj.photo\n     elif isinstance(obj, Organisation):\n-        img = obj.logo\n+        if obj.logo:\n+            img = obj.logo\n+        else:\n+            default_img = \"//{}{}{}\".format(\n+                context[\"request\"].get_host(),\n+                getattr(settings, \"STATIC_URL\"),\n+                \"images/default-org-logo.jpg\")\n     elif isinstance(obj, get_user_model()):\n         img = obj.avatar\n     elif isinstance(obj, PartnerSite):\n@@ -33,13 +40,10 @@\n     elif isinstance(obj, Keyword):\n         img = obj.logo\n \n-    height = '{}.px'.format(height)\n-\n-    return {'alt': alt,\n-            'height': height,\n-            'img': img,\n-            'geometry': geometry,\n-            'width': width}\n+    return {\"default_img\": default_img,\n+            \"geometry\": geometry,\n+            \"img\": img,\n+            \"alt\": alt}\n \n \n @register.inclusion_tag('rsr_utils/vid_img.html', takes_context=True)\n", "issue": "Add a default Organsiation Logo image\n- [x] Finalise image decision\n- [x] Implement new image\n## Test plan\n\nGIVEN the organisation directory page\nWHEN an organisation has no logo\nTHEN the image as shown below should be displayed\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nfrom __future__ import absolute_import, print_function\n\nfrom django import template\nfrom django.contrib.auth import get_user_model\nfrom akvo.rsr.models import Keyword, PartnerSite, Project, ProjectUpdate, Organisation\nregister = template.Library()\n\n\n@register.inclusion_tag('rsr_utils/img.html', takes_context=True)\ndef img(context, obj, width, height, alt):\n    \"\"\"Standard way to show image.\"\"\"\n    geometry = '{}x{}'.format(width, height)\n\n    # Based on type get image\n    img = obj\n    if isinstance(obj, Project):\n        img = obj.current_image\n    elif isinstance(obj, ProjectUpdate):\n        img = obj.photo\n    elif isinstance(obj, Organisation):\n        img = obj.logo\n    elif isinstance(obj, get_user_model()):\n        img = obj.avatar\n    elif isinstance(obj, PartnerSite):\n        img = obj.logo\n    elif isinstance(obj, Keyword):\n        img = obj.logo\n\n    height = '{}.px'.format(height)\n\n    return {'alt': alt,\n            'height': height,\n            'img': img,\n            'geometry': geometry,\n            'width': width}\n\n\n@register.inclusion_tag('rsr_utils/vid_img.html', takes_context=True)\ndef vid_img(context, obj, width, height, alt):\n    \"\"\"Standard way to show video thumbnail.\"\"\"\n    geometry = '{}x{}'.format(width, height)\n\n    # Based on type get video\n    vid = obj\n    if isinstance(obj, ProjectUpdate):\n        vid = obj.video\n\n    height = '{}.px'.format(height)\n\n    return {'alt': alt,\n            'height': height,\n            'vid': vid,\n            'geometry': geometry,\n            'width': width}\n", "path": "akvo/rsr/templatetags/rsr_utils.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nfrom __future__ import absolute_import, print_function\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom akvo.rsr.models import Keyword, PartnerSite, Project, ProjectUpdate, Organisation\nregister = template.Library()\n\n\n@register.inclusion_tag('rsr_utils/img.html', takes_context=True)\ndef img(context, obj, width, height, alt):\n    \"\"\"Standard way to show image.\"\"\"\n    img = \"\"\n    geometry = \"{}x{}\".format(width, height)\n    default_img = \"//placehold.it/{}\".format(geometry)\n\n    if isinstance(obj, Project):\n        img = obj.current_image\n    elif isinstance(obj, ProjectUpdate):\n        img = obj.photo\n    elif isinstance(obj, Organisation):\n        if obj.logo:\n            img = obj.logo\n        else:\n            default_img = \"//{}{}{}\".format(\n                context[\"request\"].get_host(),\n                getattr(settings, \"STATIC_URL\"),\n                \"images/default-org-logo.jpg\")\n    elif isinstance(obj, get_user_model()):\n        img = obj.avatar\n    elif isinstance(obj, PartnerSite):\n        img = obj.logo\n    elif isinstance(obj, Keyword):\n        img = obj.logo\n\n    return {\"default_img\": default_img,\n            \"geometry\": geometry,\n            \"img\": img,\n            \"alt\": alt}\n\n\n@register.inclusion_tag('rsr_utils/vid_img.html', takes_context=True)\ndef vid_img(context, obj, width, height, alt):\n    \"\"\"Standard way to show video thumbnail.\"\"\"\n    geometry = '{}x{}'.format(width, height)\n\n    # Based on type get video\n    vid = obj\n    if isinstance(obj, ProjectUpdate):\n        vid = obj.video\n\n    height = '{}.px'.format(height)\n\n    return {'alt': alt,\n            'height': height,\n            'vid': vid,\n            'geometry': geometry,\n            'width': width}\n", "path": "akvo/rsr/templatetags/rsr_utils.py"}]}