We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Missing search template
<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se -->

### Prerequisites

* [X] Put an X between the brackets on this line if you have done all of the
following:
    * Reproduced the problem with clear cache.
    * (If running the application locally:) Made sure your running the newest version on the development branch
    * Checked that your issue isn't already filed: https://github.com/UTNkar/moore/issues

### Description

The current search is now really working. Although you can search, the results are ugly and very spotty. 

Goal: Evaluate the searchable fields within Project Moore and make a search template.

### Steps to Reproduce

1. Visit the home page
2. Search something
3. Be disappointed ☹️ 

<!-- Please select the appropriate "topic category"/blue and "issue type"/yellow label -->

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/materialize/templatetags/materialize.py`
Content:
```
1 from django import template
2 from django.template import loader
3 
4 register = template.Library()
5 
6 
7 def get_widget_name(field):
8     return field.field.widget.__class__.__name__
9 
10 
11 def append_classes(field):
12     field.field.label_suffix = ''
13     classes = field.field.widget.attrs.get('class', '')
14     classes += ' validate'
15     if field.errors:
16         classes += ' invalid'
17     field.field.widget.attrs['class'] = classes
18 
19 
20 def render_field(template, field, prefix=None):
21     t = loader.get_template(template)
22     c = {
23         'field': field,
24         'prefix': prefix,
25     }
26     html = t.render(c)
27     return html
28 
29 
30 @register.simple_tag
31 def materialize_field(field, prefix=None):
32     widget = get_widget_name(field)
33     if widget in ['TextInput', 'EmailInput', 'PasswordInput', 'Select',
34                   'Textarea']:
35         append_classes(field)
36         return render_field('materialize/form/input.html', field, prefix)
37     else:
38         return field.as_widget()
39
```

Path: `website/search/views.py`
Content:
```
1 from __future__ import absolute_import, unicode_literals
2 
3 from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
4 from django.shortcuts import render
5 
6 from wagtail.wagtailcore.models import Page
7 from wagtail.wagtailsearch.models import Query
8 
9 
10 def search(request):
11     search_query = request.GET.get('query', None)
12     page = request.GET.get('page', 1)
13 
14     # Search
15     if search_query:
16         search_results = Page.objects.live().search(search_query)
17         query = Query.get(search_query)
18 
19         # Record hit
20         query.add_hit()
21     else:
22         search_results = Page.objects.none()
23 
24     # Pagination
25     paginator = Paginator(search_results, 10)
26     try:
27         search_results = paginator.page(page)
28     except PageNotAnInteger:
29         search_results = paginator.page(1)
30     except EmptyPage:
31         search_results = paginator.page(paginator.num_pages)
32 
33     return render(request, 'search/search.html', {
34         'search_query': search_query,
35         'search_results': search_results,
36     })
37
```
--- 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/website/materialize/templatetags/materialize.py b/website/materialize/templatetags/materialize.py
--- a/website/materialize/templatetags/materialize.py
+++ b/website/materialize/templatetags/materialize.py
@@ -23,8 +23,7 @@
         'field': field,
         'prefix': prefix,
     }
-    html = t.render(c)
-    return html
+    return t.render(c)
 
 
 @register.simple_tag
@@ -36,3 +35,12 @@
         return render_field('materialize/form/input.html', field, prefix)
     else:
         return field.as_widget()
+
+
+@register.inclusion_tag('materialize/pagination.html')
+def materialize_pagination(page, url):
+    return {
+        'page': page,
+        'paginator': page.paginator,
+        'url': url,
+    }
diff --git a/website/search/views.py b/website/search/views.py
--- a/website/search/views.py
+++ b/website/search/views.py
@@ -22,7 +22,7 @@
         search_results = Page.objects.none()
 
     # Pagination
-    paginator = Paginator(search_results, 10)
+    paginator = Paginator(search_results, 25)
     try:
         search_results = paginator.page(page)
     except PageNotAnInteger:

{"golden_diff": "diff --git a/website/materialize/templatetags/materialize.py b/website/materialize/templatetags/materialize.py\n--- a/website/materialize/templatetags/materialize.py\n+++ b/website/materialize/templatetags/materialize.py\n@@ -23,8 +23,7 @@\n         'field': field,\n         'prefix': prefix,\n     }\n-    html = t.render(c)\n-    return html\n+    return t.render(c)\n \n \n @register.simple_tag\n@@ -36,3 +35,12 @@\n         return render_field('materialize/form/input.html', field, prefix)\n     else:\n         return field.as_widget()\n+\n+\n+@register.inclusion_tag('materialize/pagination.html')\n+def materialize_pagination(page, url):\n+    return {\n+        'page': page,\n+        'paginator': page.paginator,\n+        'url': url,\n+    }\ndiff --git a/website/search/views.py b/website/search/views.py\n--- a/website/search/views.py\n+++ b/website/search/views.py\n@@ -22,7 +22,7 @@\n         search_results = Page.objects.none()\n \n     # Pagination\n-    paginator = Paginator(search_results, 10)\n+    paginator = Paginator(search_results, 25)\n     try:\n         search_results = paginator.page(page)\n     except PageNotAnInteger:\n", "issue": "Missing search template\n<!-- Do you want to ask a question? Are you looking for support? The system administrator can help you: admin@utn.se -->\r\n\r\n### Prerequisites\r\n\r\n* [X] Put an X between the brackets on this line if you have done all of the\r\nfollowing:\r\n    * Reproduced the problem with clear cache.\r\n    * (If running the application locally:) Made sure your running the newest version on the development branch\r\n    * Checked that your issue isn't already filed: https://github.com/UTNkar/moore/issues\r\n\r\n### Description\r\n\r\nThe current search is now really working. Although you can search, the results are ugly and very spotty. \r\n\r\nGoal: Evaluate the searchable fields within Project Moore and make a search template.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Visit the home page\r\n2. Search something\r\n3. Be disappointed \u2639\ufe0f \r\n\r\n<!-- Please select the appropriate \"topic category\"/blue and \"issue type\"/yellow label -->\n", "before_files": [{"content": "from django import template\nfrom django.template import loader\n\nregister = template.Library()\n\n\ndef get_widget_name(field):\n    return field.field.widget.__class__.__name__\n\n\ndef append_classes(field):\n    field.field.label_suffix = ''\n    classes = field.field.widget.attrs.get('class', '')\n    classes += ' validate'\n    if field.errors:\n        classes += ' invalid'\n    field.field.widget.attrs['class'] = classes\n\n\ndef render_field(template, field, prefix=None):\n    t = loader.get_template(template)\n    c = {\n        'field': field,\n        'prefix': prefix,\n    }\n    html = t.render(c)\n    return html\n\n\n@register.simple_tag\ndef materialize_field(field, prefix=None):\n    widget = get_widget_name(field)\n    if widget in ['TextInput', 'EmailInput', 'PasswordInput', 'Select',\n                  'Textarea']:\n        append_classes(field)\n        return render_field('materialize/form/input.html', field, prefix)\n    else:\n        return field.as_widget()\n", "path": "website/materialize/templatetags/materialize.py"}, {"content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.core.paginator import EmptyPage, PageNotAnInteger, Paginator\nfrom django.shortcuts import render\n\nfrom wagtail.wagtailcore.models import Page\nfrom wagtail.wagtailsearch.models import Query\n\n\ndef search(request):\n    search_query = request.GET.get('query', None)\n    page = request.GET.get('page', 1)\n\n    # Search\n    if search_query:\n        search_results = Page.objects.live().search(search_query)\n        query = Query.get(search_query)\n\n        # Record hit\n        query.add_hit()\n    else:\n        search_results = Page.objects.none()\n\n    # Pagination\n    paginator = Paginator(search_results, 10)\n    try:\n        search_results = paginator.page(page)\n    except PageNotAnInteger:\n        search_results = paginator.page(1)\n    except EmptyPage:\n        search_results = paginator.page(paginator.num_pages)\n\n    return render(request, 'search/search.html', {\n        'search_query': search_query,\n        'search_results': search_results,\n    })\n", "path": "website/search/views.py"}], "after_files": [{"content": "from django import template\nfrom django.template import loader\n\nregister = template.Library()\n\n\ndef get_widget_name(field):\n    return field.field.widget.__class__.__name__\n\n\ndef append_classes(field):\n    field.field.label_suffix = ''\n    classes = field.field.widget.attrs.get('class', '')\n    classes += ' validate'\n    if field.errors:\n        classes += ' invalid'\n    field.field.widget.attrs['class'] = classes\n\n\ndef render_field(template, field, prefix=None):\n    t = loader.get_template(template)\n    c = {\n        'field': field,\n        'prefix': prefix,\n    }\n    return t.render(c)\n\n\n@register.simple_tag\ndef materialize_field(field, prefix=None):\n    widget = get_widget_name(field)\n    if widget in ['TextInput', 'EmailInput', 'PasswordInput', 'Select',\n                  'Textarea']:\n        append_classes(field)\n        return render_field('materialize/form/input.html', field, prefix)\n    else:\n        return field.as_widget()\n\n\n@register.inclusion_tag('materialize/pagination.html')\ndef materialize_pagination(page, url):\n    return {\n        'page': page,\n        'paginator': page.paginator,\n        'url': url,\n    }\n", "path": "website/materialize/templatetags/materialize.py"}, {"content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.core.paginator import EmptyPage, PageNotAnInteger, Paginator\nfrom django.shortcuts import render\n\nfrom wagtail.wagtailcore.models import Page\nfrom wagtail.wagtailsearch.models import Query\n\n\ndef search(request):\n    search_query = request.GET.get('query', None)\n    page = request.GET.get('page', 1)\n\n    # Search\n    if search_query:\n        search_results = Page.objects.live().search(search_query)\n        query = Query.get(search_query)\n\n        # Record hit\n        query.add_hit()\n    else:\n        search_results = Page.objects.none()\n\n    # Pagination\n    paginator = Paginator(search_results, 25)\n    try:\n        search_results = paginator.page(page)\n    except PageNotAnInteger:\n        search_results = paginator.page(1)\n    except EmptyPage:\n        search_results = paginator.page(paginator.num_pages)\n\n    return render(request, 'search/search.html', {\n        'search_query': search_query,\n        'search_results': search_results,\n    })\n", "path": "website/search/views.py"}]}