We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Display the version number in the footer
![screen shot 2018-03-06 at 11 22 17](https://user-images.githubusercontent.com/1609292/37027086-a8dd8482-2130-11e8-8c72-939dae625a64.png)

In the footer, next to "Available on github", we can display the version number from this file: https://github.com/kartoza/projecta/blob/develop/django_project/.version

To be able to know between staging and production which version we are running

Sentry is already reading this file: https://github.com/kartoza/projecta/blob/develop/django_project/core/settings/prod.py#L47

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `django_project/lesson/templatetags/lesson_tags.py`
Content:
```
1 # coding=utf-8
2 """Custom tags for lesson app."""
3 
4 from django import template
5 from django.utils.safestring import mark_safe
6 
7 register = template.Library()
8 
9 
10 @register.filter(name='is_translation_up_to_date')
11 def is_translation_up_to_date(value):
12     if not value.is_translation_up_to_date:
13         return mark_safe(
14             '<span title="Translation is outdated"><sup>&#x2757;</sup></span>')
15     else:
16         return mark_safe('')
17
```
--- 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()

```

diff --git a/django_project/lesson/templatetags/lesson_tags.py b/django_project/lesson/templatetags/lesson_tags.py
--- a/django_project/lesson/templatetags/lesson_tags.py
+++ b/django_project/lesson/templatetags/lesson_tags.py
@@ -1,8 +1,9 @@
 # coding=utf-8
 """Custom tags for lesson app."""
-
 from django import template
 from django.utils.safestring import mark_safe
+from core.settings.utils import absolute_path
+
 
 register = template.Library()
 
@@ -14,3 +15,16 @@
             '<span title="Translation is outdated"><sup>&#x2757;</sup></span>')
     else:
         return mark_safe('')
+
+
+@register.simple_tag(takes_context=True)
+def version_tag(context):
+    """Reads current project release from the .version file."""
+    version_file = absolute_path('.version')
+    try:
+        with open(version_file, 'r') as file:
+            version = file.read()
+            context['version'] = version
+    except IOError:
+        context['version'] = 'Unknown'
+    return context['version']

{"golden_diff": "diff --git a/django_project/lesson/templatetags/lesson_tags.py b/django_project/lesson/templatetags/lesson_tags.py\n--- a/django_project/lesson/templatetags/lesson_tags.py\n+++ b/django_project/lesson/templatetags/lesson_tags.py\n@@ -1,8 +1,9 @@\n # coding=utf-8\n \"\"\"Custom tags for lesson app.\"\"\"\n-\n from django import template\n from django.utils.safestring import mark_safe\n+from core.settings.utils import absolute_path\n+\n \n register = template.Library()\n \n@@ -14,3 +15,16 @@\n             '<span title=\"Translation is outdated\"><sup>&#x2757;</sup></span>')\n     else:\n         return mark_safe('')\n+\n+\n+@register.simple_tag(takes_context=True)\n+def version_tag(context):\n+    \"\"\"Reads current project release from the .version file.\"\"\"\n+    version_file = absolute_path('.version')\n+    try:\n+        with open(version_file, 'r') as file:\n+            version = file.read()\n+            context['version'] = version\n+    except IOError:\n+        context['version'] = 'Unknown'\n+    return context['version']\n", "issue": "Display the version number in the footer\n![screen shot 2018-03-06 at 11 22 17](https://user-images.githubusercontent.com/1609292/37027086-a8dd8482-2130-11e8-8c72-939dae625a64.png)\r\n\r\nIn the footer, next to \"Available on github\", we can display the version number from this file: https://github.com/kartoza/projecta/blob/develop/django_project/.version\r\n\r\nTo be able to know between staging and production which version we are running\r\n\r\nSentry is already reading this file: https://github.com/kartoza/projecta/blob/develop/django_project/core/settings/prod.py#L47\n", "before_files": [{"content": "# coding=utf-8\n\"\"\"Custom tags for lesson app.\"\"\"\n\nfrom django import template\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter(name='is_translation_up_to_date')\ndef is_translation_up_to_date(value):\n    if not value.is_translation_up_to_date:\n        return mark_safe(\n            '<span title=\"Translation is outdated\"><sup>&#x2757;</sup></span>')\n    else:\n        return mark_safe('')\n", "path": "django_project/lesson/templatetags/lesson_tags.py"}], "after_files": [{"content": "# coding=utf-8\n\"\"\"Custom tags for lesson app.\"\"\"\nfrom django import template\nfrom django.utils.safestring import mark_safe\nfrom core.settings.utils import absolute_path\n\n\nregister = template.Library()\n\n\n@register.filter(name='is_translation_up_to_date')\ndef is_translation_up_to_date(value):\n    if not value.is_translation_up_to_date:\n        return mark_safe(\n            '<span title=\"Translation is outdated\"><sup>&#x2757;</sup></span>')\n    else:\n        return mark_safe('')\n\n\n@register.simple_tag(takes_context=True)\ndef version_tag(context):\n    \"\"\"Reads current project release from the .version file.\"\"\"\n    version_file = absolute_path('.version')\n    try:\n        with open(version_file, 'r') as file:\n            version = file.read()\n            context['version'] = version\n    except IOError:\n        context['version'] = 'Unknown'\n    return context['version']\n", "path": "django_project/lesson/templatetags/lesson_tags.py"}]}