We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Support RTL/BiDi website layout
Currently, the html attribute `dir` is set to RTL when required, which gets us part of the way there. However more changes are needed to truly mirror the layout. This essentially boils down to switching 'left' with 'right' in css rules and html classes in all but a few exceptional cases. 

Some good suggestions for how to use `sass`/`scss` features to achieve this are included in this blog: http://matanich.com/2013/09/06/rtl-css-with-sass



--- 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 THIRD_PARTY_APPS = [
44     "django_bootstrap_breadcrumbs",
45     "modeltranslation",
46 ]
47 
48 # Apps specific for this project go here.
49 LOCAL_APPS = [
50     "general.apps.GeneralConfig",
51     "topics.apps.TopicsConfig",
52     "resources.apps.ResourcesConfig",
53 ]
54 
55 # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
56 INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
57 
58 # MIDDLEWARE CONFIGURATION
59 # ----------------------------------------------------------------------------
60 MIDDLEWARE = [
61     "django.middleware.security.SecurityMiddleware",
62     "django.contrib.sessions.middleware.SessionMiddleware",
63     "django.middleware.locale.LocaleMiddleware",
64     "django.middleware.common.CommonMiddleware",
65     "django.middleware.csrf.CsrfViewMiddleware",
66     "django.contrib.auth.middleware.AuthenticationMiddleware",
67     "django.contrib.messages.middleware.MessageMiddleware",
68     "django.middleware.clickjacking.XFrameOptionsMiddleware",
69 ]
70 
71 # DEBUG
72 # ----------------------------------------------------------------------------
73 # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
74 DEBUG = env.bool("DJANGO_DEBUG", False)
75 
76 # FIXTURE CONFIGURATION
77 # ----------------------------------------------------------------------------
78 # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
79 FIXTURE_DIRS = (
80     str(ROOT_DIR.path("fixtures")),
81 )
82 
83 # EMAIL CONFIGURATION
84 # -----------------------------------------------------------------------------
85 # EMAIL_BACKEND = env("DJANGO_EMAIL_BACKEND",
86 #                     default="django.core.mail.backends.smtp.EmailBackend")
87 
88 # MANAGER CONFIGURATION
89 # ----------------------------------------------------------------------------
90 # See: https://docs.djangoproject.com/en/dev/ref/settings/#admins
91 # ADMINS = [
92 #     ("University of Canterbury Computer Science Research Group",
93 #      "csse-education@canterbury.ac.nz"),
94 # ]
95 
96 # See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
97 # MANAGERS = ADMINS
98 
99 # GENERAL CONFIGURATION
100 # ----------------------------------------------------------------------------
101 # Local time zone for this installation. Choices can be found here:
102 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
103 # although not all choices may be available on all operating systems.
104 # In a Windows environment this must be set to your system time zone.
105 TIME_ZONE = "UTC"
106 
107 # See: https://docs.djangoproject.com/en/dev/ref/settings/#language-code
108 LANGUAGE_CODE = "en"
109 
110 INCONTEXT_L10N_PSEUDOLANGUAGE = "xx-lr"
111 INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI = "yy-rl"
112 INCONTEXT_L10N_PSEUDOLANGUAGES = (
113     INCONTEXT_L10N_PSEUDOLANGUAGE,
114     INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI
115 )
116 
117 LANGUAGES = (
118     ("en", "English"),
119 )
120 
121 if env.bool("INCLUDE_INCONTEXT_L10N", False):
122     EXTRA_LANGUAGES = [
123         (INCONTEXT_L10N_PSEUDOLANGUAGE, "Translation mode"),
124         (INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI, "Translation mode (Bi-directional)"),
125     ]
126 
127     EXTRA_LANG_INFO = {
128         INCONTEXT_L10N_PSEUDOLANGUAGE: {
129             'bidi': False,
130             'code': INCONTEXT_L10N_PSEUDOLANGUAGE,
131             'name': "Translation mode",
132             'name_local': _("Translation mode"),
133         },
134         INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI: {
135             'bidi': True,
136             'code': INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI,
137             'name': "Translation mode (Bi-directional)",
138             'name_local': _("Translation mode (Bi-directional)"),
139         }
140     }
141 
142     django.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)
143     # Add new languages to the list of all django languages
144     global_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES
145     # Add new languages to the list of languages used for this project
146     LANGUAGES += tuple(EXTRA_LANGUAGES)
147 
148 
149 # See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id
150 SITE_ID = 1
151 
152 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
153 USE_I18N = True
154 
155 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n
156 USE_L10N = True
157 
158 # See: https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
159 USE_TZ = True
160 
161 # See: https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
162 LOCALE_PATHS = ["locale"]
163 
164 # TEMPLATE CONFIGURATION
165 # ----------------------------------------------------------------------------
166 # See: https://docs.djangoproject.com/en/dev/ref/settings/#templates
167 TEMPLATES = [
168     {
169         # See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
170         "BACKEND": "django.template.backends.django.DjangoTemplates",
171         # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
172         "DIRS": [
173             str(ROOT_DIR.path("templates")),
174         ],
175         "OPTIONS": {
176             # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
177             "debug": DEBUG,
178             # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
179             # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
180             "loaders": [
181                 "django.template.loaders.filesystem.Loader",
182                 "django.template.loaders.app_directories.Loader",
183             ],
184             # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
185             "context_processors": [
186                 "django.template.context_processors.debug",
187                 "django.template.context_processors.request",
188                 "django.contrib.auth.context_processors.auth",
189                 "django.template.context_processors.i18n",
190                 "django.template.context_processors.media",
191                 "django.template.context_processors.static",
192                 "django.template.context_processors.tz",
193                 "django.contrib.messages.context_processors.messages",
194                 "config.context_processors.version_number.version_number",
195                 "config.context_processors.deployed.deployed",
196             ],
197             "libraries": {
198                 "render_html_field": "config.templatetags.render_html_field",
199                 "translate_url": "config.templatetags.translate_url",
200             },
201         },
202     },
203 ]
204 
205 # STATIC FILE CONFIGURATION
206 # ------------------------------------------------------------------------------
207 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
208 STATIC_ROOT = os.path.join(str(ROOT_DIR.path("staticfiles")), "")
209 
210 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
211 BUILD_ROOT = os.path.join(str(ROOT_DIR.path("build")), "")
212 STATIC_URL = "/staticfiles/"
213 
214 # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
215 STATICFILES_DIRS = [
216     BUILD_ROOT,
217 ]
218 
219 # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
220 STATICFILES_FINDERS = [
221     "django.contrib.staticfiles.finders.FileSystemFinder",
222     "django.contrib.staticfiles.finders.AppDirectoriesFinder",
223 ]
224 
225 # MEDIA CONFIGURATION
226 # ------------------------------------------------------------------------------
227 # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-root
228 MEDIA_ROOT = str(ROOT_DIR("media"))
229 
230 # See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
231 MEDIA_URL = "/media/"
232 
233 # URL Configuration
234 # ------------------------------------------------------------------------------
235 ROOT_URLCONF = "config.urls"
236 
237 # See: https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application
238 WSGI_APPLICATION = "config.wsgi.application"
239 
240 # PASSWORD VALIDATION
241 # https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
242 # ------------------------------------------------------------------------------
243 
244 AUTH_PASSWORD_VALIDATORS = [
245     {
246         "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
247     },
248     {
249         "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
250     },
251     {
252         "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
253     },
254     {
255         "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
256     },
257 ]
258 # OTHER SETTINGS
259 # ------------------------------------------------------------------------------
260 DJANGO_PRODUCTION = env.bool("DJANGO_PRODUCTION")
261 TOPICS_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path("topics")), "content")
262 RESOURCES_CONTENT_BASE_PATH = os.path.join(str(ROOT_DIR.path("resources")), "content")
263 RESOURCE_GENERATION_LOCATION = os.path.join(str(ROOT_DIR.path("staticfiles")), "resources")
264 RESOURCE_GENERATORS_PACKAGE = "resources.generators"
265 RESOURCE_COPY_AMOUNT = 20
266 SCRATCH_GENERATION_LOCATION = str(ROOT_DIR.path("temp"))
267 CUSTOM_VERTO_TEMPLATES = os.path.join(str(ROOT_DIR.path("utils")), "custom_converter_templates", "")
268 MODELTRANSLATION_CUSTOM_FIELDS = ("JSONField",)
269
```
--- 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
@@ -43,6 +43,7 @@
 THIRD_PARTY_APPS = [
     "django_bootstrap_breadcrumbs",
     "modeltranslation",
+    "bidiutils",
 ]
 
 # Apps specific for this project go here.
@@ -142,8 +143,11 @@
     django.conf.locale.LANG_INFO.update(EXTRA_LANG_INFO)
     # Add new languages to the list of all django languages
     global_settings.LANGUAGES = global_settings.LANGUAGES + EXTRA_LANGUAGES
+    global_settings.LANGUAGES_BIDI = (global_settings.LANGUAGES_BIDI +
+                                      [INCONTEXT_L10N_PSEUDOLANGUAGE_BIDI.split('-')[0]])
     # Add new languages to the list of languages used for this project
     LANGUAGES += tuple(EXTRA_LANGUAGES)
+    LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI
 
 
 # See: https://docs.djangoproject.com/en/dev/ref/settings/#site-id
@@ -193,6 +197,7 @@
                 "django.contrib.messages.context_processors.messages",
                 "config.context_processors.version_number.version_number",
                 "config.context_processors.deployed.deployed",
+                "bidiutils.context_processors.bidi",
             ],
             "libraries": {
                 "render_html_field": "config.templatetags.render_html_field",

{"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@@ -43,6 +43,7 @@\n THIRD_PARTY_APPS = [\n     \"django_bootstrap_breadcrumbs\",\n     \"modeltranslation\",\n+    \"bidiutils\",\n ]\n \n # Apps specific for this project go here.\n@@ -142,8 +143,11 @@\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\n@@ -193,6 +197,7 @@\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", "issue": "Support RTL/BiDi website layout\nCurrently, the html attribute `dir` is set to RTL when required, which gets us part of the way there. However more changes are needed to truly mirror the layout. This essentially boils down to switching 'left' with 'right' in css rules and html classes in all but a few exceptional cases. \r\n\r\nSome good suggestions for how to use `sass`/`scss` features to achieve this are included in this blog: http://matanich.com/2013/09/06/rtl-css-with-sass\r\n\r\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]\nTHIRD_PARTY_APPS = [\n    \"django_bootstrap_breadcrumbs\",\n    \"modeltranslation\",\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]\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps\nINSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_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    # Add new languages to the list of languages used for this project\n    LANGUAGES += tuple(EXTRA_LANGUAGES)\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            ],\n            \"libraries\": {\n                \"render_html_field\": \"config.templatetags.render_html_field\",\n                \"translate_url\": \"config.templatetags.translate_url\",\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# 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"}], "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    # Admin\n    \"django.contrib.admin\",\n]\nTHIRD_PARTY_APPS = [\n    \"django_bootstrap_breadcrumbs\",\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]\n\n# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps\nINSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_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            },\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# 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"}]}