We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove admin application


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `csunplugged/config/settings/base.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3 Base Django settings for CS Unplugged project.
4 
5 For more information on this file, see
6 https://docs.djangoproject.com/en/dev/topics/settings/
7 
8 For the full list of settings and their values, see
9 https://docs.djangoproject.com/en/dev/ref/settings/
10 """
11 
12 import environ
13 import os.path
14 
15 # Add custom languages not provided by Django
16 import django.conf.locale
17 from django.conf import global_settings
18 from django.utils.translation import ugettext_lazy as _
19 
20 # cs-unplugged/csunplugged/config/settings/base.py - 3 = csunplugged/
21 ROOT_DIR = environ.Path(__file__) - 3
22 
23 # Load operating system environment variables and then prepare to use them
24 env = environ.Env()
25 
26 # APP CONFIGURATION
27 # ----------------------------------------------------------------------------
28 DJANGO_APPS = [
29     # Default Django apps:
30     "django.contrib.auth",
31     "django.contrib.contenttypes",
32     "django.contrib.sessions",
33     "django.contrib.messages",
34     "django.contrib.staticfiles",
35     "django.contrib.postgres",
36 
37     # Useful template tags
38     "django.contrib.humanize",
39 
40     # Admin
41     "django.contrib.admin",
42 ]
43 
44 THIRD_PARTY_APPS = [
45     "django_bootstrap_breadcrumbs",
46     "haystack",
47     "widget_tweaks",
48     "modeltranslation",
49     "bidiutils",
50 ]
51 
52 # Apps specific for this project go here.
53 LOCAL_APPS = [
54     "general.apps.GeneralConfig",
55     "topics.apps.TopicsConfig",
56     "resources.apps.ResourcesConfig",
57     "search.apps.SearchConfig",
58 ]
59 
60 # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
61 INSTALLED_APPS = DJANGO_APPS + LOCAL_APPS + THIRD_PARTY_APPS
62 
63 # MIDDLEWARE CONFIGURATION
64 # ----------------------------------------------------------------------------
65 MIDDLEWARE = [
66     "django.middleware.security.SecurityMiddleware",
67     "django.contrib.sessions.middleware.SessionMiddleware",
68     "django.middleware.locale.LocaleMiddleware",
69     "django.middleware.common.CommonMiddleware",
70     "django.middleware.csrf.CsrfViewMiddleware",
71     "django.contrib.auth.middleware.AuthenticationMiddleware",
72     "django.contrib.messages.middleware.MessageMiddleware",
73     "django.middleware.clickjacking.XFrameOptionsMiddleware",
74 ]
75 
76 # DEBUG
77 # ----------------------------------------------------------------------------
78 # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
79 DEBUG = env.bool("DJANGO_DEBUG", False)
80 
81 # FIXTURE CONFIGURATION
82 # ----------------------------------------------------------------------------
83 # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
84 FIXTURE_DIRS = (
85     str(ROOT_DIR.path("fixtures")),
86 )
87 
88 # EMAIL CONFIGURATION
89 # -----------------------------------------------------------------------------
90 # EMAIL_BACKEND = env("DJANGO_EMAIL_BACKEND",
91 #                     default="django.core.mail.backends.smtp.EmailBackend")
92 
93 # MANAGER CONFIGURATION
94 # ----------------------------------------------------------------------------
95 # See: https://docs.djangoproject.com/en/dev/ref/settings/#admins
96 # ADMINS = [
97 #     ("University of Canterbury Computer Science Research Group",
98 #      "csse-education@canterbury.ac.nz"),
99 # ]
100 
101 # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
102 # MANAGERS = ADMINS
103 
104 # GENERAL CONFIGURATION
105 # ----------------------------------------------------------------------------
106 # Local time zone for this installation. Choices can be found here:
107 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
108 # although not all choices may be available on all operating systems.
109 # In a Windows environment this must be set to your system time zone.
110 TIME_ZONE = "UTC"
111 
112 # See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
113 LANGUAGE_CODE = "en"
114 
115 INCONTEXT_L10N_PSEUDOLANGUAGE = "xx-lr"
116 INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI = "yy-rl"
117 INCONTEXT_L10N_PSEUDOLANGUAGES = (
118     INCONTEXT_L10N_PSEUDOLANGUAGE,
119     INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI
120 )
121 
122 LANGUAGES = (
123     ("en", "English"),
124 )
125 
126 if env.bool("INCLUDE_INCONTEXT_L10N", False):
127     EXTRA_LANGUAGES = [
128         (INCONTEXT_L10N_PSEUDOLANGUAGE, "Translation mode"),
129         (INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI, "Translation mode (Bi-directional)"),
130     ]
131 
132     EXTRA_LANG_INFO = {
133         INCONTEXT_L10N_PSEUDOLANGUAGE: {
134             'bidi': False,
135             'code': INCONTEXT_L10N_PSEUDOLANGUAGE,
136             'name': "Translation mode",
137             'name_local': _("Translation mode"),
138         },
139         INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI: {
140             'bidi': True,
141             'code': INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI,
142             'name': "Translation mode (Bi-directional)",
143             'name_local': _("Translation mode (Bi-directional)"),
144         }
145     }
146 
147     django.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)
148     # Add new languages to the list of all django languages
149     global_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES
150     global_settings.LANGUAGES_BIDI = (global_settings.LANGUAGES_BIDI +
151                                       [INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI.split('-')[0]])
152     # Add new languages to the list of languages used for this project
153     LANGUAGES += tuple(EXTRA_LANGUAGES)
154     LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI
155 
156 
157 # See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id
158 SITE_ID = 1
159 
160 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
161 USE_I18N = True
162 
163 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n
164 USE_L10N = True
165 
166 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
167 USE_TZ = True
168 
169 # See: https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
170 LOCALE_PATHS = ["locale"]
171 
172 # TEMPLATE CONFIGURATION
173 # ----------------------------------------------------------------------------
174 # See: https://docs.djangoproject.com/en/dev/ref/settings/#templates
175 TEMPLATES = [
176     {
177         # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
178         "BACKEND": "django.template.backends.django.DjangoTemplates",
179         # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
180         "DIRS": [
181             str(ROOT_DIR.path("templates")),
182         ],
183         "OPTIONS": {
184             # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
185             "debug": DEBUG,
186             # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
187             # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
188             "loaders": [
189                 "django.template.loaders.filesystem.Loader",
190                 "django.template.loaders.app_directories.Loader",
191             ],
192             # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
193             "context_processors": [
194                 "django.template.context_processors.debug",
195                 "django.template.context_processors.request",
196                 "django.contrib.auth.context_processors.auth",
197                 "django.template.context_processors.i18n",
198                 "django.template.context_processors.media",
199                 "django.template.context_processors.static",
200                 "django.template.context_processors.tz",
201                 "django.contrib.messages.context_processors.messages",
202                 "config.context_processors.version_number.version_number",
203                 "config.context_processors.deployed.deployed",
204                 "bidiutils.context_processors.bidi",
205             ],
206             "libraries": {
207                 "render_html_field": "config.templatetags.render_html_field",
208                 "translate_url": "config.templatetags.translate_url",
209                 "query_replace": "config.templatetags.query_replace",
210             },
211         },
212     },
213 ]
214 
215 # STATIC FILE CONFIGURATION
216 # ------------------------------------------------------------------------------
217 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
218 STATIC_ROOT = os.path.join(str(ROOT_DIR.path("staticfiles")), "")
219 
220 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
221 BUILD_ROOT = os.path.join(str(ROOT_DIR.path("build")), "")
222 STATIC_URL = "/staticfiles/"
223 
224 # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
225 STATICFILES_DIRS = [
226     BUILD_ROOT,
227 ]
228 
229 # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
230 STATICFILES_FINDERS = [
231     "django.contrib.staticfiles.finders.FileSystemFinder",
232     "django.contrib.staticfiles.finders.AppDirectoriesFinder",
233 ]
234 
235 # MEDIA CONFIGURATION
236 # ------------------------------------------------------------------------------
237 # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
238 MEDIA_ROOT = str(ROOT_DIR("media"))
239 
240 # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
241 MEDIA_URL = "/media/"
242 
243 # URL Configuration
244 # ------------------------------------------------------------------------------
245 ROOT_URLCONF = "config.urls"
246 
247 # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application
248 WSGI_APPLICATION = "config.wsgi.application"
249 
250 # PASSWORD VALIDATION
251 # https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
252 # ------------------------------------------------------------------------------
253 
254 AUTH_PASSWORD_VALIDATORS = [
255     {
256         "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
257     },
258     {
259         "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
260     },
261     {
262         "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
263     },
264     {
265         "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
266     },
267 ]
268 
269 # SEARCH CONFIGURATION
270 # ------------------------------------------------------------------------------
271 # See: http://django-haystack.readthedocs.io/en/v2.6.0/settings.html
272 HAYSTACK_CONNECTIONS = {
273     "default": {
274         "ENGINE": "haystack.backends.whoosh_backend.WhooshEngine",
275         "PATH": str(ROOT_DIR.path("whoosh_index")),
276     },
277 }
278 HAYSTACK_SEARCH_RESULTS_PER_PAGE = 10
279 
280 # OTHER SETTINGS
281 # ------------------------------------------------------------------------------
282 DJANGO_PRODUCTION = env.bool("DJANGO_PRODUCTION")
283 TOPICS_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path("topics")), "content")
284 RESOURCES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path("resources")), "content")
285 RESOURCE_GENERATION_LOCATION = os.path.join(str(ROOT_DIR.path("staticfiles")), "resources")
286 RESOURCE_GENERATORS_PACKAGE = "resources.generators"
287 RESOURCE_COPY_AMOUNT = 20
288 SCRATCH_GENERATION_LOCATION = str(ROOT_DIR.path("temp"))
289 CUSTOM_VERTO_TEMPLATES = os.path.join(str(ROOT_DIR.path("utils")), "custom_converter_templates", "")
290 MODELTRANSLATION_CUSTOM_FIELDS = ("JSONField",)
291
```

Path: `csunplugged/config/urls.py`
Content:
```
1 """URL configuration for the Django system.
2 
3 The `urlpatterns` list routes URLs to views. For more information please see:
4     https://docs.djangoproject.com/en/dev/topics/http/urls/
5 """
6 
7 from django.conf import settings
8 from django.conf.urls import include, url
9 from django.conf.urls.i18n import i18n_patterns
10 from django.contrib import admin
11 from general import views
12 
13 urlpatterns = i18n_patterns(
14     url(r"", include("general.urls", namespace="general")),
15     url(r"^topics/", include("topics.urls", namespace="topics")),
16     url(r"^resources/", include("resources.urls", namespace="resources")),
17     url(r"^admin/", include(admin.site.urls)),
18     url(r"^search/", include("search.urls", namespace="search")),
19 )
20 
21 urlpatterns += [
22     url(r"", include("classic.urls")),
23     url(r"^_ah/health", views.health_check),
24 ]
25 
26 if settings.DEBUG:  # pragma: no cover
27     import debug_toolbar
28     urlpatterns += [
29         url(r"^__debug__/", include(debug_toolbar.urls)),
30     ]
31     urlpatterns += i18n_patterns(
32         url(r"^__dev__/", include("dev.urls", namespace="dev")),
33     )
34     # These patterns allows these error pages to be debugged during development.
35     from django.views import defaults
36     urlpatterns += [
37         url(r'^400/$', defaults.bad_request, kwargs={'exception': Exception("Bad request")}),
38         url(r'^403/$', defaults.permission_denied, kwargs={'exception': Exception("Permissin denied")}),
39         url(r'^404/$', defaults.page_not_found, kwargs={'exception': Exception("Page not found")}),
40         url(r'^500/$', defaults.server_error),
41     ]
42
```
--- 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/csunplugged/config/settings/base.py b/csunplugged/config/settings/base.py
--- a/csunplugged/config/settings/base.py
+++ b/csunplugged/config/settings/base.py
@@ -36,9 +36,6 @@
 
     # Useful template tags
     "django.contrib.humanize",
-
-    # Admin
-    "django.contrib.admin",
 ]
 
 THIRD_PARTY_APPS = [
diff --git a/csunplugged/config/urls.py b/csunplugged/config/urls.py
--- a/csunplugged/config/urls.py
+++ b/csunplugged/config/urls.py
@@ -7,14 +7,12 @@
 from django.conf import settings
 from django.conf.urls import include, url
 from django.conf.urls.i18n import i18n_patterns
-from django.contrib import admin
 from general import views
 
 urlpatterns = i18n_patterns(
     url(r"", include("general.urls", namespace="general")),
     url(r"^topics/", include("topics.urls", namespace="topics")),
     url(r"^resources/", include("resources.urls", namespace="resources")),
-    url(r"^admin/", include(admin.site.urls)),
     url(r"^search/", include("search.urls", namespace="search")),
 )

{"golden_diff": "diff --git a/csunplugged/config/settings/base.py b/csunplugged/config/settings/base.py\n--- a/csunplugged/config/settings/base.py\n+++ b/csunplugged/config/settings/base.py\n@@ -36,9 +36,6 @@\n \n     # Useful template tags\n     \"django.contrib.humanize\",\n-\n-    # Admin\n-    \"django.contrib.admin\",\n ]\n \n THIRD_PARTY_APPS = [\ndiff --git a/csunplugged/config/urls.py b/csunplugged/config/urls.py\n--- a/csunplugged/config/urls.py\n+++ b/csunplugged/config/urls.py\n@@ -7,14 +7,12 @@\n from django.conf import settings\n from django.conf.urls import include, url\n from django.conf.urls.i18n import i18n_patterns\n-from django.contrib import admin\n from general import views\n \n urlpatterns = i18n_patterns(\n     url(r\"\", include(\"general.urls\", namespace=\"general\")),\n     url(r\"^topics/\", include(\"topics.urls\", namespace=\"topics\")),\n     url(r\"^resources/\", include(\"resources.urls\", namespace=\"resources\")),\n-    url(r\"^admin/\", include(admin.site.urls)),\n     url(r\"^search/\", include(\"search.urls\", namespace=\"search\")),\n )\n", "issue": "Remove admin application\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nBase Django settings for CS Unplugged project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\n\nimport environ\nimport os.path\n\n# Add custom languages not provided by Django\nimport django.conf.locale\nfrom django.conf import global_settings\nfrom django.utils.translation import ugettext_lazy as _\n\n# cs-unplugged/csunplugged/config/settings/base.py - 3 = csunplugged/\nROOT_DIR = environ.Path(__file__) - 3\n\n# Load operating system environment variables and then prepare to use them\nenv = environ.Env()\n\n# APP CONFIGURATION\n# ----------------------------------------------------------------------------\nDJANGO_APPS = [\n    # Default Django apps:\n    \"django.contrib.auth\",\n    \"django.contrib.contenttypes\",\n    \"django.contrib.sessions\",\n    \"django.contrib.messages\",\n    \"django.contrib.staticfiles\",\n    \"django.contrib.postgres\",\n\n    # Useful template tags\n    \"django.contrib.humanize\",\n\n    # Admin\n    \"django.contrib.admin\",\n]\n\nTHIRD_PARTY_APPS = [\n    \"django_bootstrap_breadcrumbs\",\n    \"haystack\",\n    \"widget_tweaks\",\n    \"modeltranslation\",\n    \"bidiutils\",\n]\n\n# Apps specific for this project go here.\nLOCAL_APPS = [\n    \"general.apps.GeneralConfig\",\n    \"topics.apps.TopicsConfig\",\n    \"resources.apps.ResourcesConfig\",\n    \"search.apps.SearchConfig\",\n]\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps\nINSTALLED_APPS = DJANGO_APPS + LOCAL_APPS + THIRD_PARTY_APPS\n\n# MIDDLEWARE CONFIGURATION\n# ----------------------------------------------------------------------------\nMIDDLEWARE = [\n    \"django.middleware.security.SecurityMiddleware\",\n    \"django.contrib.sessions.middleware.SessionMiddleware\",\n    \"django.middleware.locale.LocaleMiddleware\",\n    \"django.middleware.common.CommonMiddleware\",\n    \"django.middleware.csrf.CsrfViewMiddleware\",\n    \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n    \"django.contrib.messages.middleware.MessageMiddleware\",\n    \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n]\n\n# DEBUG\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug\nDEBUG = env.bool(\"DJANGO_DEBUG\", False)\n\n# FIXTURE CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS\nFIXTURE_DIRS = (\n    str(ROOT_DIR.path(\"fixtures\")),\n)\n\n# EMAIL CONFIGURATION\n# -----------------------------------------------------------------------------\n# EMAIL_BACKEND = env(\"DJANGO_EMAIL_BACKEND\",\n#                     default=\"django.core.mail.backends.smtp.EmailBackend\")\n\n# MANAGER CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#admins\n# ADMINS = [\n#     (\"University of Canterbury Computer Science Research Group\",\n#      \"csse-education@canterbury.ac.nz\"),\n# ]\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers\n# MANAGERS = ADMINS\n\n# GENERAL CONFIGURATION\n# ----------------------------------------------------------------------------\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# In a Windows environment this must be set to your system time zone.\nTIME_ZONE = \"UTC\"\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code\nLANGUAGE_CODE = \"en\"\n\nINCONTEXT_L10N_PSEUDOLANGUAGE = \"xx-lr\"\nINCONTEXT_L10N_PSEUDOLANGUAGE_BIDI = \"yy-rl\"\nINCONTEXT_L10N_PSEUDOLANGUAGES = (\n    INCONTEXT_L10N_PSEUDOLANGUAGE,\n    INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI\n)\n\nLANGUAGES = (\n    (\"en\", \"English\"),\n)\n\nif env.bool(\"INCLUDE_INCONTEXT_L10N\", False):\n    EXTRA_LANGUAGES = [\n        (INCONTEXT_L10N_PSEUDOLANGUAGE, \"Translation mode\"),\n        (INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI, \"Translation mode (Bi-directional)\"),\n    ]\n\n    EXTRA_LANG_INFO = {\n        INCONTEXT_L10N_PSEUDOLANGUAGE: {\n            'bidi': False,\n            'code': INCONTEXT_L10N_PSEUDOLANGUAGE,\n            'name': \"Translation mode\",\n            'name_local': _(\"Translation mode\"),\n        },\n        INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI: {\n            'bidi': True,\n            'code': INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI,\n            'name': \"Translation mode (Bi-directional)\",\n            'name_local': _(\"Translation mode (Bi-directional)\"),\n        }\n    }\n\n    django.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)\n    # Add new languages to the list of all django languages\n    global_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES\n    global_settings.LANGUAGES_BIDI = (global_settings.LANGUAGES_BIDI +\n                                      [INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI.split('-')[0]])\n    # Add new languages to the list of languages used for this project\n    LANGUAGES += tuple(EXTRA_LANGUAGES)\n    LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI\n\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id\nSITE_ID = 1\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n\nUSE_I18N = True\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n\nUSE_L10N = True\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz\nUSE_TZ = True\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths\nLOCALE_PATHS = [\"locale\"]\n\n# TEMPLATE CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#templates\nTEMPLATES = [\n    {\n        # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND\n        \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n        # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs\n        \"DIRS\": [\n            str(ROOT_DIR.path(\"templates\")),\n        ],\n        \"OPTIONS\": {\n            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug\n            \"debug\": DEBUG,\n            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders\n            # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types\n            \"loaders\": [\n                \"django.template.loaders.filesystem.Loader\",\n                \"django.template.loaders.app_directories.Loader\",\n            ],\n            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors\n            \"context_processors\": [\n                \"django.template.context_processors.debug\",\n                \"django.template.context_processors.request\",\n                \"django.contrib.auth.context_processors.auth\",\n                \"django.template.context_processors.i18n\",\n                \"django.template.context_processors.media\",\n                \"django.template.context_processors.static\",\n                \"django.template.context_processors.tz\",\n                \"django.contrib.messages.context_processors.messages\",\n                \"config.context_processors.version_number.version_number\",\n                \"config.context_processors.deployed.deployed\",\n                \"bidiutils.context_processors.bidi\",\n            ],\n            \"libraries\": {\n                \"render_html_field\": \"config.templatetags.render_html_field\",\n                \"translate_url\": \"config.templatetags.translate_url\",\n                \"query_replace\": \"config.templatetags.query_replace\",\n            },\n        },\n    },\n]\n\n# STATIC FILE CONFIGURATION\n# ------------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root\nSTATIC_ROOT = os.path.join(str(ROOT_DIR.path(\"staticfiles\")), \"\")\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url\nBUILD_ROOT = os.path.join(str(ROOT_DIR.path(\"build\")), \"\")\nSTATIC_URL = \"/staticfiles/\"\n\n# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS\nSTATICFILES_DIRS = [\n    BUILD_ROOT,\n]\n\n# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders\nSTATICFILES_FINDERS = [\n    \"django.contrib.staticfiles.finders.FileSystemFinder\",\n    \"django.contrib.staticfiles.finders.AppDirectoriesFinder\",\n]\n\n# MEDIA CONFIGURATION\n# ------------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root\nMEDIA_ROOT = str(ROOT_DIR(\"media\"))\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url\nMEDIA_URL = \"/media/\"\n\n# URL Configuration\n# ------------------------------------------------------------------------------\nROOT_URLCONF = \"config.urls\"\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application\nWSGI_APPLICATION = \"config.wsgi.application\"\n\n# PASSWORD VALIDATION\n# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators\n# ------------------------------------------------------------------------------\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n    },\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.MinimumLengthValidator\",\n    },\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.CommonPasswordValidator\",\n    },\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.NumericPasswordValidator\",\n    },\n]\n\n# SEARCH CONFIGURATION\n# ------------------------------------------------------------------------------\n# See: http://django-haystack.readthedocs.io/en/v2.6.0/settings.html\nHAYSTACK_CONNECTIONS = {\n    \"default\": {\n        \"ENGINE\": \"haystack.backends.whoosh_backend.WhooshEngine\",\n        \"PATH\": str(ROOT_DIR.path(\"whoosh_index\")),\n    },\n}\nHAYSTACK_SEARCH_RESULTS_PER_PAGE = 10\n\n# OTHER SETTINGS\n# ------------------------------------------------------------------------------\nDJANGO_PRODUCTION = env.bool(\"DJANGO_PRODUCTION\")\nTOPICS_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path(\"topics\")), \"content\")\nRESOURCES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path(\"resources\")), \"content\")\nRESOURCE_GENERATION_LOCATION = os.path.join(str(ROOT_DIR.path(\"staticfiles\")), \"resources\")\nRESOURCE_GENERATORS_PACKAGE = \"resources.generators\"\nRESOURCE_COPY_AMOUNT = 20\nSCRATCH_GENERATION_LOCATION = str(ROOT_DIR.path(\"temp\"))\nCUSTOM_VERTO_TEMPLATES = os.path.join(str(ROOT_DIR.path(\"utils\")), \"custom_converter_templates\", \"\")\nMODELTRANSLATION_CUSTOM_FIELDS = (\"JSONField\",)\n", "path": "csunplugged/config/settings/base.py"}, {"content": "\"\"\"URL configuration for the Django system.\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n    https://docs.djangoproject.com/en/dev/topics/http/urls/\n\"\"\"\n\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib import admin\nfrom general import views\n\nurlpatterns = i18n_patterns(\n    url(r\"\", include(\"general.urls\", namespace=\"general\")),\n    url(r\"^topics/\", include(\"topics.urls\", namespace=\"topics\")),\n    url(r\"^resources/\", include(\"resources.urls\", namespace=\"resources\")),\n    url(r\"^admin/\", include(admin.site.urls)),\n    url(r\"^search/\", include(\"search.urls\", namespace=\"search\")),\n)\n\nurlpatterns += [\n    url(r\"\", include(\"classic.urls\")),\n    url(r\"^_ah/health\", views.health_check),\n]\n\nif settings.DEBUG:  # pragma: no cover\n    import debug_toolbar\n    urlpatterns += [\n        url(r\"^__debug__/\", include(debug_toolbar.urls)),\n    ]\n    urlpatterns += i18n_patterns(\n        url(r\"^__dev__/\", include(\"dev.urls\", namespace=\"dev\")),\n    )\n    # These patterns allows these error pages to be debugged during development.\n    from django.views import defaults\n    urlpatterns += [\n        url(r'^400/$', defaults.bad_request, kwargs={'exception': Exception(\"Bad request\")}),\n        url(r'^403/$', defaults.permission_denied, kwargs={'exception': Exception(\"Permissin denied\")}),\n        url(r'^404/$', defaults.page_not_found, kwargs={'exception': Exception(\"Page not found\")}),\n        url(r'^500/$', defaults.server_error),\n    ]\n", "path": "csunplugged/config/urls.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nBase Django settings for CS Unplugged project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\n\nimport environ\nimport os.path\n\n# Add custom languages not provided by Django\nimport django.conf.locale\nfrom django.conf import global_settings\nfrom django.utils.translation import ugettext_lazy as _\n\n# cs-unplugged/csunplugged/config/settings/base.py - 3 = csunplugged/\nROOT_DIR = environ.Path(__file__) - 3\n\n# Load operating system environment variables and then prepare to use them\nenv = environ.Env()\n\n# APP CONFIGURATION\n# ----------------------------------------------------------------------------\nDJANGO_APPS = [\n    # Default Django apps:\n    \"django.contrib.auth\",\n    \"django.contrib.contenttypes\",\n    \"django.contrib.sessions\",\n    \"django.contrib.messages\",\n    \"django.contrib.staticfiles\",\n    \"django.contrib.postgres\",\n\n    # Useful template tags\n    \"django.contrib.humanize\",\n]\n\nTHIRD_PARTY_APPS = [\n    \"django_bootstrap_breadcrumbs\",\n    \"haystack\",\n    \"widget_tweaks\",\n    \"modeltranslation\",\n    \"bidiutils\",\n]\n\n# Apps specific for this project go here.\nLOCAL_APPS = [\n    \"general.apps.GeneralConfig\",\n    \"topics.apps.TopicsConfig\",\n    \"resources.apps.ResourcesConfig\",\n    \"search.apps.SearchConfig\",\n]\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps\nINSTALLED_APPS = DJANGO_APPS + LOCAL_APPS + THIRD_PARTY_APPS\n\n# MIDDLEWARE CONFIGURATION\n# ----------------------------------------------------------------------------\nMIDDLEWARE = [\n    \"django.middleware.security.SecurityMiddleware\",\n    \"django.contrib.sessions.middleware.SessionMiddleware\",\n    \"django.middleware.locale.LocaleMiddleware\",\n    \"django.middleware.common.CommonMiddleware\",\n    \"django.middleware.csrf.CsrfViewMiddleware\",\n    \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n    \"django.contrib.messages.middleware.MessageMiddleware\",\n    \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n]\n\n# DEBUG\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug\nDEBUG = env.bool(\"DJANGO_DEBUG\", False)\n\n# FIXTURE CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS\nFIXTURE_DIRS = (\n    str(ROOT_DIR.path(\"fixtures\")),\n)\n\n# EMAIL CONFIGURATION\n# -----------------------------------------------------------------------------\n# EMAIL_BACKEND = env(\"DJANGO_EMAIL_BACKEND\",\n#                     default=\"django.core.mail.backends.smtp.EmailBackend\")\n\n# MANAGER CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#admins\n# ADMINS = [\n#     (\"University of Canterbury Computer Science Research Group\",\n#      \"csse-education@canterbury.ac.nz\"),\n# ]\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers\n# MANAGERS = ADMINS\n\n# GENERAL CONFIGURATION\n# ----------------------------------------------------------------------------\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# In a Windows environment this must be set to your system time zone.\nTIME_ZONE = \"UTC\"\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code\nLANGUAGE_CODE = \"en\"\n\nINCONTEXT_L10N_PSEUDOLANGUAGE = \"xx-lr\"\nINCONTEXT_L10N_PSEUDOLANGUAGE_BIDI = \"yy-rl\"\nINCONTEXT_L10N_PSEUDOLANGUAGES = (\n    INCONTEXT_L10N_PSEUDOLANGUAGE,\n    INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI\n)\n\nLANGUAGES = (\n    (\"en\", \"English\"),\n)\n\nif env.bool(\"INCLUDE_INCONTEXT_L10N\", False):\n    EXTRA_LANGUAGES = [\n        (INCONTEXT_L10N_PSEUDOLANGUAGE, \"Translation mode\"),\n        (INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI, \"Translation mode (Bi-directional)\"),\n    ]\n\n    EXTRA_LANG_INFO = {\n        INCONTEXT_L10N_PSEUDOLANGUAGE: {\n            'bidi': False,\n            'code': INCONTEXT_L10N_PSEUDOLANGUAGE,\n            'name': \"Translation mode\",\n            'name_local': _(\"Translation mode\"),\n        },\n        INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI: {\n            'bidi': True,\n            'code': INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI,\n            'name': \"Translation mode (Bi-directional)\",\n            'name_local': _(\"Translation mode (Bi-directional)\"),\n        }\n    }\n\n    django.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)\n    # Add new languages to the list of all django languages\n    global_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES\n    global_settings.LANGUAGES_BIDI = (global_settings.LANGUAGES_BIDI +\n                                      [INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI.split('-')[0]])\n    # Add new languages to the list of languages used for this project\n    LANGUAGES += tuple(EXTRA_LANGUAGES)\n    LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI\n\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id\nSITE_ID = 1\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n\nUSE_I18N = True\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n\nUSE_L10N = True\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz\nUSE_TZ = True\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths\nLOCALE_PATHS = [\"locale\"]\n\n# TEMPLATE CONFIGURATION\n# ----------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#templates\nTEMPLATES = [\n    {\n        # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND\n        \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n        # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs\n        \"DIRS\": [\n            str(ROOT_DIR.path(\"templates\")),\n        ],\n        \"OPTIONS\": {\n            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug\n            \"debug\": DEBUG,\n            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders\n            # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types\n            \"loaders\": [\n                \"django.template.loaders.filesystem.Loader\",\n                \"django.template.loaders.app_directories.Loader\",\n            ],\n            # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors\n            \"context_processors\": [\n                \"django.template.context_processors.debug\",\n                \"django.template.context_processors.request\",\n                \"django.contrib.auth.context_processors.auth\",\n                \"django.template.context_processors.i18n\",\n                \"django.template.context_processors.media\",\n                \"django.template.context_processors.static\",\n                \"django.template.context_processors.tz\",\n                \"django.contrib.messages.context_processors.messages\",\n                \"config.context_processors.version_number.version_number\",\n                \"config.context_processors.deployed.deployed\",\n                \"bidiutils.context_processors.bidi\",\n            ],\n            \"libraries\": {\n                \"render_html_field\": \"config.templatetags.render_html_field\",\n                \"translate_url\": \"config.templatetags.translate_url\",\n                \"query_replace\": \"config.templatetags.query_replace\",\n            },\n        },\n    },\n]\n\n# STATIC FILE CONFIGURATION\n# ------------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root\nSTATIC_ROOT = os.path.join(str(ROOT_DIR.path(\"staticfiles\")), \"\")\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url\nBUILD_ROOT = os.path.join(str(ROOT_DIR.path(\"build\")), \"\")\nSTATIC_URL = \"/staticfiles/\"\n\n# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS\nSTATICFILES_DIRS = [\n    BUILD_ROOT,\n]\n\n# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders\nSTATICFILES_FINDERS = [\n    \"django.contrib.staticfiles.finders.FileSystemFinder\",\n    \"django.contrib.staticfiles.finders.AppDirectoriesFinder\",\n]\n\n# MEDIA CONFIGURATION\n# ------------------------------------------------------------------------------\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root\nMEDIA_ROOT = str(ROOT_DIR(\"media\"))\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url\nMEDIA_URL = \"/media/\"\n\n# URL Configuration\n# ------------------------------------------------------------------------------\nROOT_URLCONF = \"config.urls\"\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application\nWSGI_APPLICATION = \"config.wsgi.application\"\n\n# PASSWORD VALIDATION\n# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators\n# ------------------------------------------------------------------------------\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n    },\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.MinimumLengthValidator\",\n    },\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.CommonPasswordValidator\",\n    },\n    {\n        \"NAME\": \"django.contrib.auth.password_validation.NumericPasswordValidator\",\n    },\n]\n\n# SEARCH CONFIGURATION\n# ------------------------------------------------------------------------------\n# See: http://django-haystack.readthedocs.io/en/v2.6.0/settings.html\nHAYSTACK_CONNECTIONS = {\n    \"default\": {\n        \"ENGINE\": \"haystack.backends.whoosh_backend.WhooshEngine\",\n        \"PATH\": str(ROOT_DIR.path(\"whoosh_index\")),\n    },\n}\nHAYSTACK_SEARCH_RESULTS_PER_PAGE = 10\n\n# OTHER SETTINGS\n# ------------------------------------------------------------------------------\nDJANGO_PRODUCTION = env.bool(\"DJANGO_PRODUCTION\")\nTOPICS_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path(\"topics\")), \"content\")\nRESOURCES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path(\"resources\")), \"content\")\nRESOURCE_GENERATION_LOCATION = os.path.join(str(ROOT_DIR.path(\"staticfiles\")), \"resources\")\nRESOURCE_GENERATORS_PACKAGE = \"resources.generators\"\nRESOURCE_COPY_AMOUNT = 20\nSCRATCH_GENERATION_LOCATION = str(ROOT_DIR.path(\"temp\"))\nCUSTOM_VERTO_TEMPLATES = os.path.join(str(ROOT_DIR.path(\"utils\")), \"custom_converter_templates\", \"\")\nMODELTRANSLATION_CUSTOM_FIELDS = (\"JSONField\",)\n", "path": "csunplugged/config/settings/base.py"}, {"content": "\"\"\"URL configuration for the Django system.\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n    https://docs.djangoproject.com/en/dev/topics/http/urls/\n\"\"\"\n\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.conf.urls.i18n import i18n_patterns\nfrom general import views\n\nurlpatterns = i18n_patterns(\n    url(r\"\", include(\"general.urls\", namespace=\"general\")),\n    url(r\"^topics/\", include(\"topics.urls\", namespace=\"topics\")),\n    url(r\"^resources/\", include(\"resources.urls\", namespace=\"resources\")),\n    url(r\"^search/\", include(\"search.urls\", namespace=\"search\")),\n)\n\nurlpatterns += [\n    url(r\"\", include(\"classic.urls\")),\n    url(r\"^_ah/health\", views.health_check),\n]\n\nif settings.DEBUG:  # pragma: no cover\n    import debug_toolbar\n    urlpatterns += [\n        url(r\"^__debug__/\", include(debug_toolbar.urls)),\n    ]\n    urlpatterns += i18n_patterns(\n        url(r\"^__dev__/\", include(\"dev.urls\", namespace=\"dev\")),\n    )\n    # These patterns allows these error pages to be debugged during development.\n    from django.views import defaults\n    urlpatterns += [\n        url(r'^400/$', defaults.bad_request, kwargs={'exception': Exception(\"Bad request\")}),\n        url(r'^403/$', defaults.permission_denied, kwargs={'exception': Exception(\"Permissin denied\")}),\n        url(r'^404/$', defaults.page_not_found, kwargs={'exception': Exception(\"Page not found\")}),\n        url(r'^500/$', defaults.server_error),\n    ]\n", "path": "csunplugged/config/urls.py"}]}