prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Un template qui n'est pas variabilisé
  Comme on peut le constater dans le template [opensearch.xml](https://github.com/zestedesavoir/zds-site/blob/3e91b083ee882396abf4dc0d508595d9bdb101d7/templates/search/opensearch.xml#L13) il y'a une valeur en dur qui y traine.
  
  Il faut remplacer la ligne : 
  
  ``` python
  <Contact>http://zestedesavoir.com/pages/contact/</Contact>
  ```
  
  par 
  
  ``` python
  <Contact>{% url "zds.pages.views.contact" %}</Contact>
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `zds/search/views.py`
  Content:
  ```
  1 # coding: utf-8
  2 from django.db.models import Q
  3 
  4 from django.shortcuts import render
  5 from django.core.urlresolvers import reverse
  6 from haystack.views import SearchView
  7 
  8 from zds import settings
  9 from zds.utils.paginator import paginator_range
  10 
  11 
  12 class CustomSearchView(SearchView):
  13 
  14     def create_response(self):
  15         (paginator, page) = self.build_page()
  16 
  17         page_nbr = int(self.request.GET.get('page', 1))
  18 
  19         context = {
  20             'query': self.query,
  21             'form': self.form,
  22             'page': page,
  23             'pages': paginator_range(page_nbr, paginator.num_pages),
  24             'nb': page_nbr,
  25             'paginator': paginator,
  26             'suggestion': None,
  27             'model_name': '',
  28             'models': self.request.GET.getlist('models', ''),
  29         }
  30 
  31         if self.results and hasattr(self.results, 'query') and self.results.query.backend.include_spelling:
  32             context['suggestion'] = self.form.get_suggestion()
  33 
  34         context.update(self.extra_context())
  35         return render(self.request, self.template, context)
  36 
  37     def get_results(self):
  38         queryset = super(CustomSearchView, self).get_results()
  39 
  40         # We want to search only on authorized post and topic
  41         if self.request.user.is_authenticated():
  42             groups = self.request.user.groups
  43 
  44             if groups.count() > 0:
  45                 return queryset.filter(Q(permissions="public") |
  46                                        Q(permissions__in=[group.name for group in groups.all()]))
  47             else:
  48                 return queryset.filter(permissions="public")
  49         else:
  50             return queryset.filter(permissions="public")
  51 
  52 
  53 def opensearch(request):
  54     """Generate OpenSearch Description file"""
  55 
  56     return render(request, 'search/opensearch.xml', {
  57         'site_name': settings.ZDS_APP['site']['litteral_name'],
  58         'site_url': settings.ZDS_APP['site']['url'],
  59         'language': settings.LANGUAGE_CODE,
  60         'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')
  61     }, content_type='application/opensearchdescription+xml')
  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/zds/search/views.py b/zds/search/views.py
  --- a/zds/search/views.py
  +++ b/zds/search/views.py
  @@ -56,6 +56,7 @@
       return render(request, 'search/opensearch.xml', {
           'site_name': settings.ZDS_APP['site']['litteral_name'],
           'site_url': settings.ZDS_APP['site']['url'],
  +        'email_contact': settings.ZDS_APP['site']['email_contact'],
           'language': settings.LANGUAGE_CODE,
           'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')
       }, content_type='application/opensearchdescription+xml')
  
verification_info: {"golden_diff": "diff --git a/zds/search/views.py b/zds/search/views.py\n--- a/zds/search/views.py\n+++ b/zds/search/views.py\n@@ -56,6 +56,7 @@\n     return render(request, 'search/opensearch.xml', {\n         'site_name': settings.ZDS_APP['site']['litteral_name'],\n         'site_url': settings.ZDS_APP['site']['url'],\n+        'email_contact': settings.ZDS_APP['site']['email_contact'],\n         'language': settings.LANGUAGE_CODE,\n         'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')\n     }, content_type='application/opensearchdescription+xml')\n", "issue": "Un template qui n'est pas variabilis\u00e9\nComme on peut le constater dans le template [opensearch.xml](https://github.com/zestedesavoir/zds-site/blob/3e91b083ee882396abf4dc0d508595d9bdb101d7/templates/search/opensearch.xml#L13) il y'a une valeur en dur qui y traine.\n\nIl faut remplacer la ligne : \n\n``` python\n<Contact>http://zestedesavoir.com/pages/contact/</Contact>\n```\n\npar \n\n``` python\n<Contact>{% url \"zds.pages.views.contact\" %}</Contact>\n```\n\n", "before_files": [{"content": "# coding: utf-8\nfrom django.db.models import Q\n\nfrom django.shortcuts import render\nfrom django.core.urlresolvers import reverse\nfrom haystack.views import SearchView\n\nfrom zds import settings\nfrom zds.utils.paginator import paginator_range\n\n\nclass CustomSearchView(SearchView):\n\n    def create_response(self):\n        (paginator, page) = self.build_page()\n\n        page_nbr = int(self.request.GET.get('page', 1))\n\n        context = {\n            'query': self.query,\n            'form': self.form,\n            'page': page,\n            'pages': paginator_range(page_nbr, paginator.num_pages),\n            'nb': page_nbr,\n            'paginator': paginator,\n            'suggestion': None,\n            'model_name': '',\n            'models': self.request.GET.getlist('models', ''),\n        }\n\n        if self.results and hasattr(self.results, 'query') and self.results.query.backend.include_spelling:\n            context['suggestion'] = self.form.get_suggestion()\n\n        context.update(self.extra_context())\n        return render(self.request, self.template, context)\n\n    def get_results(self):\n        queryset = super(CustomSearchView, self).get_results()\n\n        # We want to search only on authorized post and topic\n        if self.request.user.is_authenticated():\n            groups = self.request.user.groups\n\n            if groups.count() > 0:\n                return queryset.filter(Q(permissions=\"public\") |\n                                       Q(permissions__in=[group.name for group in groups.all()]))\n            else:\n                return queryset.filter(permissions=\"public\")\n        else:\n            return queryset.filter(permissions=\"public\")\n\n\ndef opensearch(request):\n    \"\"\"Generate OpenSearch Description file\"\"\"\n\n    return render(request, 'search/opensearch.xml', {\n        'site_name': settings.ZDS_APP['site']['litteral_name'],\n        'site_url': settings.ZDS_APP['site']['url'],\n        'language': settings.LANGUAGE_CODE,\n        'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')\n    }, content_type='application/opensearchdescription+xml')\n", "path": "zds/search/views.py"}], "after_files": [{"content": "# coding: utf-8\nfrom django.db.models import Q\n\nfrom django.shortcuts import render\nfrom django.core.urlresolvers import reverse\nfrom haystack.views import SearchView\n\nfrom zds import settings\nfrom zds.utils.paginator import paginator_range\n\n\nclass CustomSearchView(SearchView):\n\n    def create_response(self):\n        (paginator, page) = self.build_page()\n\n        page_nbr = int(self.request.GET.get('page', 1))\n\n        context = {\n            'query': self.query,\n            'form': self.form,\n            'page': page,\n            'pages': paginator_range(page_nbr, paginator.num_pages),\n            'nb': page_nbr,\n            'paginator': paginator,\n            'suggestion': None,\n            'model_name': '',\n            'models': self.request.GET.getlist('models', ''),\n        }\n\n        if self.results and hasattr(self.results, 'query') and self.results.query.backend.include_spelling:\n            context['suggestion'] = self.form.get_suggestion()\n\n        context.update(self.extra_context())\n        return render(self.request, self.template, context)\n\n    def get_results(self):\n        queryset = super(CustomSearchView, self).get_results()\n\n        # We want to search only on authorized post and topic\n        if self.request.user.is_authenticated():\n            groups = self.request.user.groups\n\n            if groups.count() > 0:\n                return queryset.filter(Q(permissions=\"public\") |\n                                       Q(permissions__in=[group.name for group in groups.all()]))\n            else:\n                return queryset.filter(permissions=\"public\")\n        else:\n            return queryset.filter(permissions=\"public\")\n\n\ndef opensearch(request):\n    \"\"\"Generate OpenSearch Description file\"\"\"\n\n    return render(request, 'search/opensearch.xml', {\n        'site_name': settings.ZDS_APP['site']['litteral_name'],\n        'site_url': settings.ZDS_APP['site']['url'],\n        'email_contact': settings.ZDS_APP['site']['email_contact'],\n        'language': settings.LANGUAGE_CODE,\n        'search_url': settings.ZDS_APP['site']['url'] + reverse('haystack_search')\n    }, content_type='application/opensearchdescription+xml')\n", "path": "zds/search/views.py"}]}