We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Sort out the Front end architecture of the project


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 from setuptools import find_packages, setup
3 import versioneer
4 
5 setup(name='codeforlife-portal',
6       cmdclass=versioneer.get_cmdclass(),
7       version=versioneer.get_version(),
8       packages=find_packages(),
9       include_package_data=True,
10       install_requires=[
11         'django==1.8.2',
12         'django-appconf==1.0.1',
13         'django-countries==3.4.1',
14         'djangorestframework==3.1.3',
15         'django-jquery==1.9.1',
16         'django-autoconfig==0.3.6',
17 
18         'pyyaml==3.10',
19         'rapid-router >= 1.0.0.post.dev1',
20         'six==1.9.0',
21         'docutils==0.12',
22         'django-recaptcha-field==1.0b2',
23         'reportlab==3.2.0',
24         'postcodes==0.1',
25         'django-formtools==1.0',
26         'django-two-factor-auth==1.2.0',
27         'urllib3==1.10.4',
28         'requests==2.7.0',
29 
30         'django-cms==3.1.2',
31 
32         'django-classy-tags==0.6.1',
33         'django-treebeard==3.0',
34         'django-sekizai==0.8.2',
35         'djangocms-admin-style==0.2.8',
36 
37         'djangocms-text-ckeditor==2.6.0',
38         'djangocms-link==1.6.2',
39         'djangocms-snippet==1.5',
40         'djangocms-style==1.5',
41         'djangocms-column==1.5',
42         'djangocms-grid==1.2',
43         'djangocms-oembed==0.5',
44         'djangocms-table==1.2',
45         'djangocms-file==0.1',
46         'djangocms_flash==0.2.0',
47         'djangocms_googlemap==0.3',
48         'djangocms_inherit==0.1',
49         'djangocms_picture==0.1',
50         'djangocms_teaser==0.1',
51         'djangocms_video==0.1',
52         'django-online-status==0.1.0',
53 
54 
55         'Pillow==2.9.0',
56         'django-reversion==1.9.3',
57         'sqlparse',
58       ],
59     tests_require=[
60         'django-setuptest',
61         'django-selenium-clean==0.2.1',
62         'responses==0.4.0',
63         'selenium==2.48.0',
64     ],
65     test_suite='setuptest.setuptest.SetupTestSuite',
66     zip_safe=False,
67       )
68
```

Path: `portal/autoconfig.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 # Code for Life
3 #
4 # Copyright (C) 2016, Ocado Innovation Limited
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19 # ADDITIONAL TERMS – Section 7 GNU General Public Licence
20 #
21 # This licence does not grant any right, title or interest in any “Ocado” logos,
22 # trade names or the trademark “Ocado” or any other trademarks or domain names
23 # owned by Ocado Innovation Limited or the Ocado group of companies or any other
24 # distinctive brand features of “Ocado” as may be secured from time to time. You
25 # must not distribute any modification of this program using the trademark
26 # “Ocado” or claim any affiliation or association with Ocado or its employees.
27 #
28 # You are not authorised to use the name Ocado (or any of its trade names) or
29 # the names of any author or contributor in advertising or for publicity purposes
30 # pertaining to the distribution of this program, without the prior written
31 # authorisation of Ocado.
32 #
33 # Any propagation, distribution or conveyance of this program must include this
34 # copyright notice and these terms. You must not misrepresent the origins of this
35 # program; modified versions of the program must be marked as such and not
36 # identified as the original program.
37 '''Portal autoconfig'''
38 import os
39 
40 from django_autoconfig.autoconfig import OrderingRelationship
41 
42 
43 DEFAULT_SETTINGS = {
44     'AUTOCONFIG_INDEX_VIEW': 'home',
45     'LANGUAGE_CODE': 'en-gb',
46     'SITE_ID': 1,
47     'MEDIA_ROOT': os.path.join(os.path.join(os.path.dirname(__file__), 'static'), 'email_media/')
48 }
49 
50 SETTINGS = {
51     'AUTOCONFIG_DISABLED_APPS': [
52         'django_otp',
53         'django_otp.plugins.otp_static',
54         'django_otp.plugins.otp_totp',
55     ],
56     'INSTALLED_APPS': [
57         'cms',
58         'game',
59         'portal',
60         'ratelimit',
61         'django.contrib.admin',
62         'django.contrib.admindocs',
63         'django.contrib.auth',
64         'django.contrib.contenttypes',
65         'django.contrib.sessions',
66         'django.contrib.messages',
67         'django.contrib.sites',
68         'django.contrib.staticfiles',
69         'rest_framework',
70         'jquery',
71         'django_otp',
72         'django_otp.plugins.otp_static',
73         'django_otp.plugins.otp_totp',
74         'sekizai',  # for javascript and css management
75         'treebeard',
76         'two_factor',
77     ],
78     'LANGUAGES': [
79         ('en-gb', 'English'),
80     ],
81     'MESSAGE_STORAGE': 'django.contrib.messages.storage.session.SessionStorage',
82     'MIDDLEWARE_CLASSES': [
83         'django.contrib.sessions.middleware.SessionMiddleware',
84         'django.middleware.locale.LocaleMiddleware',
85         'django.middleware.common.CommonMiddleware',
86         'django.middleware.csrf.CsrfViewMiddleware',
87         'django.contrib.auth.middleware.AuthenticationMiddleware',
88         'online_status.middleware.OnlineStatusMiddleware',
89         'django.contrib.messages.middleware.MessageMiddleware',
90         'django.middleware.clickjacking.XFrameOptionsMiddleware',
91         'deploy.middleware.exceptionlogging.ExceptionLoggingMiddleware',
92         'cms.middleware.user.CurrentUserMiddleware',
93         'cms.middleware.page.CurrentPageMiddleware',
94         'cms.middleware.toolbar.ToolbarMiddleware',
95         'cms.middleware.language.LanguageCookieMiddleware',
96         'portal.middleware.ratelimit_login_attempts.RateLimitLoginAttemptsMiddleware',
97         'django_otp.middleware.OTPMiddleware',
98     ],
99 
100     'TEMPLATES': [
101         {
102             'BACKEND': 'django.template.backends.django.DjangoTemplates',
103             'APP_DIRS': True,
104             'OPTIONS': {
105                 'context_processors': [
106                     'django.contrib.auth.context_processors.auth',
107                     'django.template.context_processors.request',
108                     'django.contrib.messages.context_processors.messages',
109                     'sekizai.context_processors.sekizai',
110                 ]
111             }
112         }
113     ],
114 
115     'CODEFORLIFE_WEBSITE': 'www.codeforlife.education',
116 
117     'CLOUD_STORAGE_PREFIX': '//storage.googleapis.com/codeforlife-assets/',
118 
119     'LOGGING': {
120         'version': 1,
121         'disable_existing_loggers': False,
122         'handlers': {
123             'console': {
124                 'level': 'DEBUG',
125                 'class': 'logging.StreamHandler',
126             },
127         },
128         'loggers': {
129             'two_factor': {
130                 'handlers': ['console'],
131                 'level': 'INFO',
132             }
133         }
134     },
135 
136     'RAPID_ROUTER_EARLY_ACCESS_FUNCTION_NAME': 'portal.beta.has_beta_access',
137 }
138 
139 RELATIONSHIPS = [
140     OrderingRelationship(
141         'MIDDLEWARE_CLASSES',
142         'cms.middleware.toolbar.ToolbarMiddleware',
143         after=[
144             'django.contrib.auth.middleware.AuthenticationMiddleware',
145         ],
146         add_missing=False,
147     ),
148     OrderingRelationship(
149         'MIDDLEWARE_CLASSES',
150         'online_status.middleware.OnlineStatusMiddleware',
151         after=[
152             'django.contrib.auth.middleware.AuthenticationMiddleware',
153         ],
154         add_missing=False,
155     ),
156     OrderingRelationship(
157         'MIDDLEWARE_CLASSES',
158         'django_otp.middleware.OTPMiddleware',
159         after=[
160             'django.contrib.auth.middleware.AuthenticationMiddleware',
161         ],
162         add_missing=False,
163     ),
164 ]
165 
166 try:
167     import django_pandasso
168     SETTINGS['INSTALLED_APPS'].append('django_pandasso')
169     SETTINGS['INSTALLED_APPS'].append('social.apps.django_app.default')
170 except ImportError:
171     pass
172
```
--- 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/portal/autoconfig.py b/portal/autoconfig.py
--- a/portal/autoconfig.py
+++ b/portal/autoconfig.py
@@ -53,9 +53,22 @@
         'django_otp.plugins.otp_static',
         'django_otp.plugins.otp_totp',
     ],
+    'PIPELINE_COMPILERS': (
+        'pipeline.compilers.sass.SASSCompiler',
+    ),
+    'PIPELINE_CSS': {
+        'css': {
+            'source_filenames': (
+                'portal/sass/*.scss',
+            ),
+            'output_filename': 'portal.css',
+        },
+    },
+    'PIPELINE_CSS_COMPRESSOR': None,
     'INSTALLED_APPS': [
         'cms',
         'game',
+        'pipeline',
         'portal',
         'ratelimit',
         'django.contrib.admin',
@@ -78,6 +91,10 @@
     'LANGUAGES': [
         ('en-gb', 'English'),
     ],
+    'STATICFILES_FINDERS': [
+        'pipeline.finders.PipelineFinder',
+    ],
+    'STATICFILES_STORAGE': 'pipeline.storage.PipelineStorage',
     'MESSAGE_STORAGE': 'django.contrib.messages.storage.session.SessionStorage',
     'MIDDLEWARE_CLASSES': [
         'django.contrib.sessions.middleware.SessionMiddleware',
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,7 @@
         'djangorestframework==3.1.3',
         'django-jquery==1.9.1',
         'django-autoconfig==0.3.6',
+        'django-pipeline==1.5.4',
 
         'pyyaml==3.10',
         'rapid-router >= 1.0.0.post.dev1',
@@ -55,6 +56,7 @@
         'Pillow==2.9.0',
         'django-reversion==1.9.3',
         'sqlparse',
+        'libsass',
       ],
     tests_require=[
         'django-setuptest',

{"golden_diff": "diff --git a/portal/autoconfig.py b/portal/autoconfig.py\n--- a/portal/autoconfig.py\n+++ b/portal/autoconfig.py\n@@ -53,9 +53,22 @@\n         'django_otp.plugins.otp_static',\n         'django_otp.plugins.otp_totp',\n     ],\n+    'PIPELINE_COMPILERS': (\n+        'pipeline.compilers.sass.SASSCompiler',\n+    ),\n+    'PIPELINE_CSS': {\n+        'css': {\n+            'source_filenames': (\n+                'portal/sass/*.scss',\n+            ),\n+            'output_filename': 'portal.css',\n+        },\n+    },\n+    'PIPELINE_CSS_COMPRESSOR': None,\n     'INSTALLED_APPS': [\n         'cms',\n         'game',\n+        'pipeline',\n         'portal',\n         'ratelimit',\n         'django.contrib.admin',\n@@ -78,6 +91,10 @@\n     'LANGUAGES': [\n         ('en-gb', 'English'),\n     ],\n+    'STATICFILES_FINDERS': [\n+        'pipeline.finders.PipelineFinder',\n+    ],\n+    'STATICFILES_STORAGE': 'pipeline.storage.PipelineStorage',\n     'MESSAGE_STORAGE': 'django.contrib.messages.storage.session.SessionStorage',\n     'MIDDLEWARE_CLASSES': [\n         'django.contrib.sessions.middleware.SessionMiddleware',\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -14,6 +14,7 @@\n         'djangorestframework==3.1.3',\n         'django-jquery==1.9.1',\n         'django-autoconfig==0.3.6',\n+        'django-pipeline==1.5.4',\n \n         'pyyaml==3.10',\n         'rapid-router >= 1.0.0.post.dev1',\n@@ -55,6 +56,7 @@\n         'Pillow==2.9.0',\n         'django-reversion==1.9.3',\n         'sqlparse',\n+        'libsass',\n       ],\n     tests_require=[\n         'django-setuptest',\n", "issue": "Sort out the Front end architecture of the project\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\nimport versioneer\n\nsetup(name='codeforlife-portal',\n      cmdclass=versioneer.get_cmdclass(),\n      version=versioneer.get_version(),\n      packages=find_packages(),\n      include_package_data=True,\n      install_requires=[\n        'django==1.8.2',\n        'django-appconf==1.0.1',\n        'django-countries==3.4.1',\n        'djangorestframework==3.1.3',\n        'django-jquery==1.9.1',\n        'django-autoconfig==0.3.6',\n\n        'pyyaml==3.10',\n        'rapid-router >= 1.0.0.post.dev1',\n        'six==1.9.0',\n        'docutils==0.12',\n        'django-recaptcha-field==1.0b2',\n        'reportlab==3.2.0',\n        'postcodes==0.1',\n        'django-formtools==1.0',\n        'django-two-factor-auth==1.2.0',\n        'urllib3==1.10.4',\n        'requests==2.7.0',\n\n        'django-cms==3.1.2',\n\n        'django-classy-tags==0.6.1',\n        'django-treebeard==3.0',\n        'django-sekizai==0.8.2',\n        'djangocms-admin-style==0.2.8',\n\n        'djangocms-text-ckeditor==2.6.0',\n        'djangocms-link==1.6.2',\n        'djangocms-snippet==1.5',\n        'djangocms-style==1.5',\n        'djangocms-column==1.5',\n        'djangocms-grid==1.2',\n        'djangocms-oembed==0.5',\n        'djangocms-table==1.2',\n        'djangocms-file==0.1',\n        'djangocms_flash==0.2.0',\n        'djangocms_googlemap==0.3',\n        'djangocms_inherit==0.1',\n        'djangocms_picture==0.1',\n        'djangocms_teaser==0.1',\n        'djangocms_video==0.1',\n        'django-online-status==0.1.0',\n\n\n        'Pillow==2.9.0',\n        'django-reversion==1.9.3',\n        'sqlparse',\n      ],\n    tests_require=[\n        'django-setuptest',\n        'django-selenium-clean==0.2.1',\n        'responses==0.4.0',\n        'selenium==2.48.0',\n    ],\n    test_suite='setuptest.setuptest.SetupTestSuite',\n    zip_safe=False,\n      )\n", "path": "setup.py"}, {"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2016, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n# ADDITIONAL TERMS \u2013 Section 7 GNU General Public Licence\n#\n# This licence does not grant any right, title or interest in any \u201cOcado\u201d logos,\n# trade names or the trademark \u201cOcado\u201d or any other trademarks or domain names\n# owned by Ocado Innovation Limited or the Ocado group of companies or any other\n# distinctive brand features of \u201cOcado\u201d as may be secured from time to time. You\n# must not distribute any modification of this program using the trademark\n# \u201cOcado\u201d or claim any affiliation or association with Ocado or its employees.\n#\n# You are not authorised to use the name Ocado (or any of its trade names) or\n# the names of any author or contributor in advertising or for publicity purposes\n# pertaining to the distribution of this program, without the prior written\n# authorisation of Ocado.\n#\n# Any propagation, distribution or conveyance of this program must include this\n# copyright notice and these terms. You must not misrepresent the origins of this\n# program; modified versions of the program must be marked as such and not\n# identified as the original program.\n'''Portal autoconfig'''\nimport os\n\nfrom django_autoconfig.autoconfig import OrderingRelationship\n\n\nDEFAULT_SETTINGS = {\n    'AUTOCONFIG_INDEX_VIEW': 'home',\n    'LANGUAGE_CODE': 'en-gb',\n    'SITE_ID': 1,\n    'MEDIA_ROOT': os.path.join(os.path.join(os.path.dirname(__file__), 'static'), 'email_media/')\n}\n\nSETTINGS = {\n    'AUTOCONFIG_DISABLED_APPS': [\n        'django_otp',\n        'django_otp.plugins.otp_static',\n        'django_otp.plugins.otp_totp',\n    ],\n    'INSTALLED_APPS': [\n        'cms',\n        'game',\n        'portal',\n        'ratelimit',\n        'django.contrib.admin',\n        'django.contrib.admindocs',\n        'django.contrib.auth',\n        'django.contrib.contenttypes',\n        'django.contrib.sessions',\n        'django.contrib.messages',\n        'django.contrib.sites',\n        'django.contrib.staticfiles',\n        'rest_framework',\n        'jquery',\n        'django_otp',\n        'django_otp.plugins.otp_static',\n        'django_otp.plugins.otp_totp',\n        'sekizai',  # for javascript and css management\n        'treebeard',\n        'two_factor',\n    ],\n    'LANGUAGES': [\n        ('en-gb', 'English'),\n    ],\n    'MESSAGE_STORAGE': 'django.contrib.messages.storage.session.SessionStorage',\n    'MIDDLEWARE_CLASSES': [\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        'online_status.middleware.OnlineStatusMiddleware',\n        'django.contrib.messages.middleware.MessageMiddleware',\n        'django.middleware.clickjacking.XFrameOptionsMiddleware',\n        'deploy.middleware.exceptionlogging.ExceptionLoggingMiddleware',\n        'cms.middleware.user.CurrentUserMiddleware',\n        'cms.middleware.page.CurrentPageMiddleware',\n        'cms.middleware.toolbar.ToolbarMiddleware',\n        'cms.middleware.language.LanguageCookieMiddleware',\n        'portal.middleware.ratelimit_login_attempts.RateLimitLoginAttemptsMiddleware',\n        'django_otp.middleware.OTPMiddleware',\n    ],\n\n    'TEMPLATES': [\n        {\n            'BACKEND': 'django.template.backends.django.DjangoTemplates',\n            'APP_DIRS': True,\n            'OPTIONS': {\n                'context_processors': [\n                    'django.contrib.auth.context_processors.auth',\n                    'django.template.context_processors.request',\n                    'django.contrib.messages.context_processors.messages',\n                    'sekizai.context_processors.sekizai',\n                ]\n            }\n        }\n    ],\n\n    'CODEFORLIFE_WEBSITE': 'www.codeforlife.education',\n\n    'CLOUD_STORAGE_PREFIX': '//storage.googleapis.com/codeforlife-assets/',\n\n    'LOGGING': {\n        'version': 1,\n        'disable_existing_loggers': False,\n        'handlers': {\n            'console': {\n                'level': 'DEBUG',\n                'class': 'logging.StreamHandler',\n            },\n        },\n        'loggers': {\n            'two_factor': {\n                'handlers': ['console'],\n                'level': 'INFO',\n            }\n        }\n    },\n\n    'RAPID_ROUTER_EARLY_ACCESS_FUNCTION_NAME': 'portal.beta.has_beta_access',\n}\n\nRELATIONSHIPS = [\n    OrderingRelationship(\n        'MIDDLEWARE_CLASSES',\n        'cms.middleware.toolbar.ToolbarMiddleware',\n        after=[\n            'django.contrib.auth.middleware.AuthenticationMiddleware',\n        ],\n        add_missing=False,\n    ),\n    OrderingRelationship(\n        'MIDDLEWARE_CLASSES',\n        'online_status.middleware.OnlineStatusMiddleware',\n        after=[\n            'django.contrib.auth.middleware.AuthenticationMiddleware',\n        ],\n        add_missing=False,\n    ),\n    OrderingRelationship(\n        'MIDDLEWARE_CLASSES',\n        'django_otp.middleware.OTPMiddleware',\n        after=[\n            'django.contrib.auth.middleware.AuthenticationMiddleware',\n        ],\n        add_missing=False,\n    ),\n]\n\ntry:\n    import django_pandasso\n    SETTINGS['INSTALLED_APPS'].append('django_pandasso')\n    SETTINGS['INSTALLED_APPS'].append('social.apps.django_app.default')\nexcept ImportError:\n    pass\n", "path": "portal/autoconfig.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\nimport versioneer\n\nsetup(name='codeforlife-portal',\n      cmdclass=versioneer.get_cmdclass(),\n      version=versioneer.get_version(),\n      packages=find_packages(),\n      include_package_data=True,\n      install_requires=[\n        'django==1.8.2',\n        'django-appconf==1.0.1',\n        'django-countries==3.4.1',\n        'djangorestframework==3.1.3',\n        'django-jquery==1.9.1',\n        'django-autoconfig==0.3.6',\n        'django-pipeline==1.5.4',\n\n        'pyyaml==3.10',\n        'rapid-router >= 1.0.0.post.dev1',\n        'six==1.9.0',\n        'docutils==0.12',\n        'django-recaptcha-field==1.0b2',\n        'reportlab==3.2.0',\n        'postcodes==0.1',\n        'django-formtools==1.0',\n        'django-two-factor-auth==1.2.0',\n        'urllib3==1.10.4',\n        'requests==2.7.0',\n\n        'django-cms==3.1.2',\n\n        'django-classy-tags==0.6.1',\n        'django-treebeard==3.0',\n        'django-sekizai==0.8.2',\n        'djangocms-admin-style==0.2.8',\n\n        'djangocms-text-ckeditor==2.6.0',\n        'djangocms-link==1.6.2',\n        'djangocms-snippet==1.5',\n        'djangocms-style==1.5',\n        'djangocms-column==1.5',\n        'djangocms-grid==1.2',\n        'djangocms-oembed==0.5',\n        'djangocms-table==1.2',\n        'djangocms-file==0.1',\n        'djangocms_flash==0.2.0',\n        'djangocms_googlemap==0.3',\n        'djangocms_inherit==0.1',\n        'djangocms_picture==0.1',\n        'djangocms_teaser==0.1',\n        'djangocms_video==0.1',\n        'django-online-status==0.1.0',\n\n\n        'Pillow==2.9.0',\n        'django-reversion==1.9.3',\n        'sqlparse',\n        'libsass',\n      ],\n    tests_require=[\n        'django-setuptest',\n        'django-selenium-clean==0.2.1',\n        'responses==0.4.0',\n        'selenium==2.48.0',\n    ],\n    test_suite='setuptest.setuptest.SetupTestSuite',\n    zip_safe=False,\n      )\n", "path": "setup.py"}, {"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2016, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n# ADDITIONAL TERMS \u2013 Section 7 GNU General Public Licence\n#\n# This licence does not grant any right, title or interest in any \u201cOcado\u201d logos,\n# trade names or the trademark \u201cOcado\u201d or any other trademarks or domain names\n# owned by Ocado Innovation Limited or the Ocado group of companies or any other\n# distinctive brand features of \u201cOcado\u201d as may be secured from time to time. You\n# must not distribute any modification of this program using the trademark\n# \u201cOcado\u201d or claim any affiliation or association with Ocado or its employees.\n#\n# You are not authorised to use the name Ocado (or any of its trade names) or\n# the names of any author or contributor in advertising or for publicity purposes\n# pertaining to the distribution of this program, without the prior written\n# authorisation of Ocado.\n#\n# Any propagation, distribution or conveyance of this program must include this\n# copyright notice and these terms. You must not misrepresent the origins of this\n# program; modified versions of the program must be marked as such and not\n# identified as the original program.\n'''Portal autoconfig'''\nimport os\n\nfrom django_autoconfig.autoconfig import OrderingRelationship\n\n\nDEFAULT_SETTINGS = {\n    'AUTOCONFIG_INDEX_VIEW': 'home',\n    'LANGUAGE_CODE': 'en-gb',\n    'SITE_ID': 1,\n    'MEDIA_ROOT': os.path.join(os.path.join(os.path.dirname(__file__), 'static'), 'email_media/')\n}\n\nSETTINGS = {\n    'AUTOCONFIG_DISABLED_APPS': [\n        'django_otp',\n        'django_otp.plugins.otp_static',\n        'django_otp.plugins.otp_totp',\n    ],\n    'PIPELINE_COMPILERS': (\n        'pipeline.compilers.sass.SASSCompiler',\n    ),\n    'PIPELINE_CSS': {\n        'css': {\n            'source_filenames': (\n                'portal/sass/*.scss',\n            ),\n            'output_filename': 'portal.css',\n        },\n    },\n    'PIPELINE_CSS_COMPRESSOR': None,\n    'INSTALLED_APPS': [\n        'cms',\n        'game',\n        'pipeline',\n        'portal',\n        'ratelimit',\n        'django.contrib.admin',\n        'django.contrib.admindocs',\n        'django.contrib.auth',\n        'django.contrib.contenttypes',\n        'django.contrib.sessions',\n        'django.contrib.messages',\n        'django.contrib.sites',\n        'django.contrib.staticfiles',\n        'rest_framework',\n        'jquery',\n        'django_otp',\n        'django_otp.plugins.otp_static',\n        'django_otp.plugins.otp_totp',\n        'sekizai',  # for javascript and css management\n        'treebeard',\n        'two_factor',\n    ],\n    'LANGUAGES': [\n        ('en-gb', 'English'),\n    ],\n    'STATICFILES_FINDERS': [\n        'pipeline.finders.PipelineFinder',\n    ],\n    'STATICFILES_STORAGE': 'pipeline.storage.PipelineStorage',\n    'MESSAGE_STORAGE': 'django.contrib.messages.storage.session.SessionStorage',\n    'MIDDLEWARE_CLASSES': [\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        'online_status.middleware.OnlineStatusMiddleware',\n        'django.contrib.messages.middleware.MessageMiddleware',\n        'django.middleware.clickjacking.XFrameOptionsMiddleware',\n        'deploy.middleware.exceptionlogging.ExceptionLoggingMiddleware',\n        'cms.middleware.user.CurrentUserMiddleware',\n        'cms.middleware.page.CurrentPageMiddleware',\n        'cms.middleware.toolbar.ToolbarMiddleware',\n        'cms.middleware.language.LanguageCookieMiddleware',\n        'portal.middleware.ratelimit_login_attempts.RateLimitLoginAttemptsMiddleware',\n        'django_otp.middleware.OTPMiddleware',\n    ],\n\n    'TEMPLATES': [\n        {\n            'BACKEND': 'django.template.backends.django.DjangoTemplates',\n            'APP_DIRS': True,\n            'OPTIONS': {\n                'context_processors': [\n                    'django.contrib.auth.context_processors.auth',\n                    'django.template.context_processors.request',\n                    'django.contrib.messages.context_processors.messages',\n                    'sekizai.context_processors.sekizai',\n                ]\n            }\n        }\n    ],\n\n    'CODEFORLIFE_WEBSITE': 'www.codeforlife.education',\n\n    'CLOUD_STORAGE_PREFIX': '//storage.googleapis.com/codeforlife-assets/',\n\n    'LOGGING': {\n        'version': 1,\n        'disable_existing_loggers': False,\n        'handlers': {\n            'console': {\n                'level': 'DEBUG',\n                'class': 'logging.StreamHandler',\n            },\n        },\n        'loggers': {\n            'two_factor': {\n                'handlers': ['console'],\n                'level': 'INFO',\n            }\n        }\n    },\n\n    'RAPID_ROUTER_EARLY_ACCESS_FUNCTION_NAME': 'portal.beta.has_beta_access',\n}\n\nRELATIONSHIPS = [\n    OrderingRelationship(\n        'MIDDLEWARE_CLASSES',\n        'cms.middleware.toolbar.ToolbarMiddleware',\n        after=[\n            'django.contrib.auth.middleware.AuthenticationMiddleware',\n        ],\n        add_missing=False,\n    ),\n    OrderingRelationship(\n        'MIDDLEWARE_CLASSES',\n        'online_status.middleware.OnlineStatusMiddleware',\n        after=[\n            'django.contrib.auth.middleware.AuthenticationMiddleware',\n        ],\n        add_missing=False,\n    ),\n    OrderingRelationship(\n        'MIDDLEWARE_CLASSES',\n        'django_otp.middleware.OTPMiddleware',\n        after=[\n            'django.contrib.auth.middleware.AuthenticationMiddleware',\n        ],\n        add_missing=False,\n    ),\n]\n\ntry:\n    import django_pandasso\n    SETTINGS['INSTALLED_APPS'].append('django_pandasso')\n    SETTINGS['INSTALLED_APPS'].append('social.apps.django_app.default')\nexcept ImportError:\n    pass\n", "path": "portal/autoconfig.py"}]}