prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Block Google from Indexing our Development Environments
  ## Test plan
  
  GIVEN all dev environments (Test / UAT)
  WHEN looking at the _head_ tag
  THEN a _meta name="robots" content="none"_ node should be added
  
  GIVEN the live environment
  WHEN looking at the _head_ tag
  THEN a _meta name="robots" content="none"_ node should not be added
  ## Issue description
  
  We should add a robots.txt to all NON LIVE machines that prevents Google from indexing the site and displaying the content in search results.
  
  This looks to be pretty simple: https://support.google.com/webmasters/answer/156449?rd=1
  
  
  --- 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/context_processors.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 """
  3 Akvo RSR is covered by the GNU Affero General Public License.
  4 
  5 See more details in the license.txt file located at the root folder of the
  6 Akvo RSR module. For additional details on the GNU license please see
  7 < http://www.gnu.org/licenses/agpl.html >.
  8 """
  9 
  10 import django
  11 
  12 from django.conf import settings
  13 from django.core.exceptions import DisallowedHost
  14 from django.contrib.sites.models import get_current_site
  15 
  16 
  17 def extra_context(request, protocol="http"):
  18     """Add information to the request context."""
  19     try:
  20         current_site = get_current_site(request)
  21     except DisallowedHost:
  22         current_site = None
  23 
  24     django_version = django.get_version()
  25     deploy_tag = getattr(settings, 'DEPLOY_TAG', 'Unknown')
  26     deploy_branch = getattr(settings, 'DEPLOY_BRANCH', 'Unknown')
  27     deploy_commit_id = getattr(settings, 'DEPLOY_COMMIT_ID', 'Unknown')
  28     deploy_commit_full_id = getattr(settings, 'DEPLOY_COMMIT_FULL_ID', 'Unknown')
  29 
  30     return dict(
  31         current_site=current_site,
  32         django_version=django_version,
  33         deploy_tag=deploy_tag,
  34         deploy_branch=deploy_branch,
  35         deploy_commit_id=deploy_commit_id,
  36         deploy_commit_full_id=deploy_commit_full_id
  37     )
  38 
  39 
  40 def get_current_path_without_lang(request):
  41     """Return current path without lang."""
  42     path = request.get_full_path()
  43     path_bits = path.split('/')
  44     path = '/'.join(path_bits[2:])
  45     return {'current_path_without_lang': path}
  46 
  47 
  48 def extra_pages_context(request):
  49     """Add context information of an RSR Page."""
  50     if request.rsr_page:
  51         page = request.rsr_page
  52         return {
  53             'rsr_page': page,
  54             'favicon': page.favicon,
  55             'logo': page.logo,
  56             'organisation': page.organisation,
  57             'return_url': page.return_url,
  58             'return_url_text': page.custom_return_url_text,
  59             'stylesheet': page.stylesheet,
  60             'akvoapp_root_url': '//{}'.format(settings.AKVOAPP_DOMAIN),
  61             'domain_url': '//{}'.format(settings.RSR_DOMAIN),
  62             'no_facebook': not page.facebook_button,
  63             'facebook_app_id': page.facebook_app_id,
  64             'no_twitter': not page.twitter_button,
  65         }
  66 
  67     return {}
  68
  ```
  --- 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/context_processors.py b/akvo/rsr/context_processors.py
  --- a/akvo/rsr/context_processors.py
  +++ b/akvo/rsr/context_processors.py
  @@ -22,6 +22,7 @@
           current_site = None
   
       django_version = django.get_version()
  +    debug = getattr(settings, 'DEBUG', False)
       deploy_tag = getattr(settings, 'DEPLOY_TAG', 'Unknown')
       deploy_branch = getattr(settings, 'DEPLOY_BRANCH', 'Unknown')
       deploy_commit_id = getattr(settings, 'DEPLOY_COMMIT_ID', 'Unknown')
  @@ -30,6 +31,7 @@
       return dict(
           current_site=current_site,
           django_version=django_version,
  +        debug=debug,
           deploy_tag=deploy_tag,
           deploy_branch=deploy_branch,
           deploy_commit_id=deploy_commit_id,
  
verification_info: {"golden_diff": "diff --git a/akvo/rsr/context_processors.py b/akvo/rsr/context_processors.py\n--- a/akvo/rsr/context_processors.py\n+++ b/akvo/rsr/context_processors.py\n@@ -22,6 +22,7 @@\n         current_site = None\n \n     django_version = django.get_version()\n+    debug = getattr(settings, 'DEBUG', False)\n     deploy_tag = getattr(settings, 'DEPLOY_TAG', 'Unknown')\n     deploy_branch = getattr(settings, 'DEPLOY_BRANCH', 'Unknown')\n     deploy_commit_id = getattr(settings, 'DEPLOY_COMMIT_ID', 'Unknown')\n@@ -30,6 +31,7 @@\n     return dict(\n         current_site=current_site,\n         django_version=django_version,\n+        debug=debug,\n         deploy_tag=deploy_tag,\n         deploy_branch=deploy_branch,\n         deploy_commit_id=deploy_commit_id,\n", "issue": "Block Google from Indexing our Development Environments\n## Test plan\n\nGIVEN all dev environments (Test / UAT)\nWHEN looking at the _head_ tag\nTHEN a _meta name=\"robots\" content=\"none\"_ node should be added\n\nGIVEN the live environment\nWHEN looking at the _head_ tag\nTHEN a _meta name=\"robots\" content=\"none\"_ node should not be added\n## Issue description\n\nWe should add a robots.txt to all NON LIVE machines that prevents Google from indexing the site and displaying the content in search results.\n\nThis looks to be pretty simple: https://support.google.com/webmasters/answer/156449?rd=1\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nAkvo 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\nAkvo RSR module. For additional details on the GNU license please see\n< http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nimport django\n\nfrom django.conf import settings\nfrom django.core.exceptions import DisallowedHost\nfrom django.contrib.sites.models import get_current_site\n\n\ndef extra_context(request, protocol=\"http\"):\n    \"\"\"Add information to the request context.\"\"\"\n    try:\n        current_site = get_current_site(request)\n    except DisallowedHost:\n        current_site = None\n\n    django_version = django.get_version()\n    deploy_tag = getattr(settings, 'DEPLOY_TAG', 'Unknown')\n    deploy_branch = getattr(settings, 'DEPLOY_BRANCH', 'Unknown')\n    deploy_commit_id = getattr(settings, 'DEPLOY_COMMIT_ID', 'Unknown')\n    deploy_commit_full_id = getattr(settings, 'DEPLOY_COMMIT_FULL_ID', 'Unknown')\n\n    return dict(\n        current_site=current_site,\n        django_version=django_version,\n        deploy_tag=deploy_tag,\n        deploy_branch=deploy_branch,\n        deploy_commit_id=deploy_commit_id,\n        deploy_commit_full_id=deploy_commit_full_id\n    )\n\n\ndef get_current_path_without_lang(request):\n    \"\"\"Return current path without lang.\"\"\"\n    path = request.get_full_path()\n    path_bits = path.split('/')\n    path = '/'.join(path_bits[2:])\n    return {'current_path_without_lang': path}\n\n\ndef extra_pages_context(request):\n    \"\"\"Add context information of an RSR Page.\"\"\"\n    if request.rsr_page:\n        page = request.rsr_page\n        return {\n            'rsr_page': page,\n            'favicon': page.favicon,\n            'logo': page.logo,\n            'organisation': page.organisation,\n            'return_url': page.return_url,\n            'return_url_text': page.custom_return_url_text,\n            'stylesheet': page.stylesheet,\n            'akvoapp_root_url': '//{}'.format(settings.AKVOAPP_DOMAIN),\n            'domain_url': '//{}'.format(settings.RSR_DOMAIN),\n            'no_facebook': not page.facebook_button,\n            'facebook_app_id': page.facebook_app_id,\n            'no_twitter': not page.twitter_button,\n        }\n\n    return {}\n", "path": "akvo/rsr/context_processors.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nAkvo 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\nAkvo RSR module. For additional details on the GNU license please see\n< http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nimport django\n\nfrom django.conf import settings\nfrom django.core.exceptions import DisallowedHost\nfrom django.contrib.sites.models import get_current_site\n\n\ndef extra_context(request, protocol=\"http\"):\n    \"\"\"Add information to the request context.\"\"\"\n    try:\n        current_site = get_current_site(request)\n    except DisallowedHost:\n        current_site = None\n\n    django_version = django.get_version()\n    debug = getattr(settings, 'DEBUG', False)\n    deploy_tag = getattr(settings, 'DEPLOY_TAG', 'Unknown')\n    deploy_branch = getattr(settings, 'DEPLOY_BRANCH', 'Unknown')\n    deploy_commit_id = getattr(settings, 'DEPLOY_COMMIT_ID', 'Unknown')\n    deploy_commit_full_id = getattr(settings, 'DEPLOY_COMMIT_FULL_ID', 'Unknown')\n\n    return dict(\n        current_site=current_site,\n        django_version=django_version,\n        debug=debug,\n        deploy_tag=deploy_tag,\n        deploy_branch=deploy_branch,\n        deploy_commit_id=deploy_commit_id,\n        deploy_commit_full_id=deploy_commit_full_id\n    )\n\n\ndef get_current_path_without_lang(request):\n    \"\"\"Return current path without lang.\"\"\"\n    path = request.get_full_path()\n    path_bits = path.split('/')\n    path = '/'.join(path_bits[2:])\n    return {'current_path_without_lang': path}\n\n\ndef extra_pages_context(request):\n    \"\"\"Add context information of an RSR Page.\"\"\"\n    if request.rsr_page:\n        page = request.rsr_page\n        return {\n            'rsr_page': page,\n            'favicon': page.favicon,\n            'logo': page.logo,\n            'organisation': page.organisation,\n            'return_url': page.return_url,\n            'return_url_text': page.custom_return_url_text,\n            'stylesheet': page.stylesheet,\n            'akvoapp_root_url': '//{}'.format(settings.AKVOAPP_DOMAIN),\n            'domain_url': '//{}'.format(settings.RSR_DOMAIN),\n            'no_facebook': not page.facebook_button,\n            'facebook_app_id': page.facebook_app_id,\n            'no_twitter': not page.twitter_button,\n        }\n\n    return {}\n", "path": "akvo/rsr/context_processors.py"}]}