We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
fix function in api.js to use contenttype json and fix all react components


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `euth_wagtail/settings/base.py`
Content:
```
1 """
2 Django settings for euth_wagtail project.
3 
4 Generated by 'django-admin startproject' using Django 1.9.1.
5 
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.9/topics/settings/
8 
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.9/ref/settings/
11 """
12 
13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 import os
15 
16 from django.utils.translation import ugettext_lazy as _
17 
18 PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19 BASE_DIR = os.path.dirname(PROJECT_DIR)
20 
21 
22 # Quick-start development settings - unsuitable for production
23 # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
24 
25 
26 # Application definition
27 
28 INSTALLED_APPS = [
29     'home',
30 
31     'wagtail.wagtailforms',
32     'wagtail.wagtailredirects',
33     'wagtail.wagtailembeds',
34     'wagtail.wagtailsites',
35     'wagtail.wagtailusers',
36     'wagtail.wagtailsnippets',
37     'wagtail.wagtaildocs',
38     'wagtail.wagtailimages',
39     'wagtail.wagtailsearch',
40     'wagtail.wagtailadmin',
41     'wagtail.wagtailcore',
42     'wagtail.contrib.wagtailstyleguide',
43 
44     'modelcluster',
45     'compressor',
46     'taggit',
47     'widget_tweaks',
48     'webpack_loader',
49     'easy_thumbnails',
50     'parler',
51     'ckeditor',
52     'ckeditor_uploader',
53 
54     'django.contrib.sites',
55     'django.contrib.admin',
56     'django.contrib.auth',
57     'django.contrib.contenttypes',
58     'django.contrib.sessions',
59     'django.contrib.messages',
60     'django.contrib.staticfiles',
61     'django_countries',
62     'rest_framework',
63     'autofixture',
64     'rules.apps.AutodiscoverRulesConfig',
65     'allauth',
66     'allauth.account',
67     'allauth.socialaccount',
68 
69     'euth.users.apps.UsersConfig',
70     'euth.organisations.apps.OrganisationsConfig',
71     'euth.projects.apps.ProjectsConfig',
72     'euth.comments.apps.CommentConfig',
73     'euth.phases.apps.PhasesConfig',
74     'euth.modules.apps.ModuleConfig',
75     'euth.ideas.apps.IdeaConfig',
76     'euth.ratings.apps.RatingsConfig',
77     'euth.reports.apps.ReportConfig',
78     'euth.dashboard.apps.DashboardConfig',
79     'euth.memberships.apps.MembershipsConfig',
80     'euth.documents.apps.DocumentConfig',
81     'euth.flashpoll.apps.FlashpollConfig',
82     'euth.contrib',
83 ]
84 
85 MIDDLEWARE_CLASSES = [
86     'django.contrib.sessions.middleware.SessionMiddleware',
87     'django.middleware.common.CommonMiddleware',
88     'django.middleware.csrf.CsrfViewMiddleware',
89     'django.contrib.auth.middleware.AuthenticationMiddleware',
90     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
91     'django.contrib.messages.middleware.MessageMiddleware',
92     'django.middleware.clickjacking.XFrameOptionsMiddleware',
93     'django.middleware.security.SecurityMiddleware',
94     'django.middleware.locale.LocaleMiddleware',
95     'wagtail.wagtailcore.middleware.SiteMiddleware',
96     'wagtail.wagtailredirects.middleware.RedirectMiddleware',
97 ]
98 
99 SITE_ID = 1
100 
101 ROOT_URLCONF = 'euth_wagtail.urls'
102 
103 LOCALE_PATHS = [os.path.join(BASE_DIR, 'locale')]
104 
105 TEMPLATES = [
106     {
107         'BACKEND': 'django.template.backends.django.DjangoTemplates',
108         'DIRS': [
109             os.path.join(PROJECT_DIR, 'templates'),
110         ],
111         'APP_DIRS': True,
112         'OPTIONS': {
113             'context_processors': [
114                 'django.template.context_processors.debug',
115                 'django.template.context_processors.request',
116                 'django.contrib.auth.context_processors.auth',
117                 'django.contrib.messages.context_processors.messages',
118             ],
119         },
120     },
121 ]
122 
123 WSGI_APPLICATION = 'euth_wagtail.wsgi.application'
124 
125 
126 # Database
127 # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
128 
129 DATABASES = {
130     'default': {
131         'ENGINE': 'django.db.backends.sqlite3',
132         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
133         'TEST': {
134             'NAME': os.path.join(BASE_DIR, 'test_db.sqlite3'),
135         }
136     }
137 }
138 
139 
140 # Auth
141 # https://docs.djangoproject.com/en/1.8/topics/auth/customizing/
142 
143 AUTH_USER_MODEL = 'euth_users.User'
144 
145 AUTHENTICATION_BACKENDS = (
146     'rules.permissions.ObjectPermissionBackend',
147     'django.contrib.auth.backends.ModelBackend',
148     'allauth.account.auth_backends.AuthenticationBackend',
149 )
150 
151 CKEDITOR_UPLOAD_PATH = "uploads/"
152 CKEDITOR_ALLOW_NONIMAGE_FILES = False
153 
154 CKEDITOR_CONFIGS = {
155     'default': {
156         'width': '100%',
157         'toolbar': 'Custom',
158         'toolbar_Custom': [
159             ['Bold', 'Italic', 'Underline'],
160             ['NumberedList', 'BulletedList'],
161             ['Link', 'Unlink']
162         ]
163     },
164     'image-editor': {
165         'width': '100%',
166         'toolbar': 'Custom',
167         'toolbar_Custom': [
168             ['Bold', 'Italic', 'Underline'],
169             ['Image'],
170             ['NumberedList', 'BulletedList'],
171             ['Link', 'Unlink']
172         ]
173     }
174 }
175 
176 BLEACH_LIST = {
177     'default' : {
178         'tags': ['p','strong','em','u','ol','li','ul','a'],
179         'attributes': {
180             'a': ['href', 'rel'],
181         },
182     },
183     'image-editor': {
184         'tags': ['p','strong','em','u','ol','li','ul','a','img'],
185         'attributes': {
186             'a': ['href', 'rel'],
187             'img': ['src', 'alt', 'style']
188         },
189         'styles': [
190             'float',
191             'margin',
192             'padding',
193             'width',
194             'height',
195             'margin-bottom',
196             'margin-top',
197             'margin-left',
198             'margin-right',
199         ],
200     }
201 }
202 
203 # Internationalization
204 # https://docs.djangoproject.com/en/1.9/topics/i18n/
205 
206 LANGUAGE_CODE = 'en'
207 
208 TIME_ZONE = 'UTC'
209 
210 USE_I18N = True
211 
212 USE_L10N = True
213 
214 USE_TZ = True
215 
216 LANGUAGES = [
217     ('en', _('English')),
218     ('de', _('German')),
219     ('it', _('Italien')),
220     ('fr', _('French')),
221     ('sv', _('Swedish')),
222     ('sl', _('Slovene')),
223     ('da', _('Danish')),
224 ]
225 
226 PARLER_LANGUAGES = {
227     1:[{'code': language_code } for language_code, language in LANGUAGES]
228 }
229 
230 # fixtures
231 
232 FIXTURE_DIRS = [ os.path.join(PROJECT_DIR, 'fixtures') ]
233 
234 ALLOWED_UPLOAD_IMAGES = ('image/png', 'image/jpeg', 'image/gif')
235 
236 THUMBNAIL_ALIASES = {
237     '': {
238         'heroimage': {'size': (1500, 500), 'crop': 'smart'},
239         'project_thumbnail': {'size': (520, 330), 'crop': 'smart'},
240         'idea_image': {'size': (800, 0), 'crop': 'scale'},
241         'organisation_thumbnail': {'size': (740, 540), 'crop': 'smart'},
242         'avatar_small': {'size': (60, 60), 'crop': 'smart'},
243         'org_avatar_small': {'size': (60, 60), 'crop': 'scale'},
244         'org_avatar_medium': {'size': (200, 200), 'crop': 'scale'},
245     }
246 }
247 # Static files (CSS, JavaScript, Images)
248 # https://docs.djangoproject.com/en/1.9/howto/static-files/
249 
250 STATICFILES_FINDERS = [
251     'django.contrib.staticfiles.finders.FileSystemFinder',
252     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
253     'compressor.finders.CompressorFinder',
254 ]
255 
256 
257 WEBPACK_LOADER = {
258     'DEFAULT': {
259         'CACHE': False,
260         'BUNDLE_DIR_NAME': 'bundles/', # must end with slash
261         'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),
262         'POLL_INTERVAL': 0.1,
263         'IGNORE': ['.+\.hot-update.js', '.+\.map']
264     }
265 }
266 
267 
268 STATICFILES_DIRS = [
269     os.path.join(BASE_DIR, 'node_modules/jquery/dist'),
270     os.path.join(BASE_DIR, 'node_modules/salvattore/dist'),
271     os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/javascripts'),
272     os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/stylesheets'),
273     os.path.join(BASE_DIR, 'node_modules/font-awesome'),
274     os.path.join(BASE_DIR, 'node_modules/owl.carousel/dist'),
275     os.path.join(BASE_DIR, 'node_modules/flatpickr/assets'),
276     os.path.join(BASE_DIR, 'node_modules/flatpickr/dist'),
277     os.path.join(PROJECT_DIR, 'static'),
278 ]
279 
280 STATIC_ROOT = os.path.join(BASE_DIR, 'static')
281 STATIC_URL = '/static/'
282 
283 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
284 MEDIA_URL = '/media/'
285 
286 COMPRESS_PRECOMPILERS = (
287     ('text/x-scss', 'django_libsass.SassCompiler'),
288 )
289 LIBSASS_SOURCEMAPS = True
290 
291 EMAIL_SUBJECT_PREFIX = '[OPIN] '
292 
293 # Wagtail settings
294 
295 WAGTAIL_SITE_NAME = "euth_wagtail"
296 
297 # Authentification
298 
299 LOGIN_URL = 'account_login'
300 LOGOUT_URL = 'account_logout'
301 LOGIN_REDIRECT_URL = '/'
302 
303 ACCOUNT_ADAPTER = 'euth.users.adapters.EuthAccountAdapter'
304 ACCOUNT_AUTHENTICATION_METHOD = 'email'
305 ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
306 ACCOUNT_EMAIL_REQUIRED = True
307 ACCOUNT_EMAIL_SUBJECT_PREFIX = EMAIL_SUBJECT_PREFIX
308 ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
309 ACCOUNT_SIGNUP_FORM_CLASS = 'euth.users.forms.SignUpForm'
310 ACCOUNT_USER_DISPLAY = 'euth.users.services.account_user_display'
311 ACCOUNT_USER_MODEL_USERNAME_FIELD = 'username'
312 ACCOUNT_USERNAME_REQUIRED = True
313 ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 10
314 ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 300  # seconds
315 ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True
316 ACCOUNT_LOGIN_ON_PASSWORD_RESET = True
317 ACCOUNT_LOGOUT_REDIRECT_URL = '/'
318 SOCIALACCOUNT_EMAIL_VERIFICATION = False
319 
320 # Euth settings
321 
322 COMMENTABLES = (
323     ('euth_ideas', 'idea'),
324     ('euth_documents', 'paragraph'),
325     ('euth_documents', 'document'),
326     ('euth_comments', 'comment'),
327 )
328 
329 RATEABLES = COMMENTABLES
330 
331 REPORTABLES = COMMENTABLES
332 
333 FLASHPOLL_URL = "https://opin.flashpoll.eu/"
334
```
--- 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/euth_wagtail/settings/base.py b/euth_wagtail/settings/base.py
--- a/euth_wagtail/settings/base.py
+++ b/euth_wagtail/settings/base.py
@@ -317,6 +317,14 @@
 ACCOUNT_LOGOUT_REDIRECT_URL = '/'
 SOCIALACCOUNT_EMAIL_VERIFICATION = False
 
+# Rest framework
+
+REST_FRAMEWORK = {
+    'DEFAULT_PARSER_CLASSES': (
+        'rest_framework.parsers.JSONParser',
+    )
+}
+
 # Euth settings
 
 COMMENTABLES = (

{"golden_diff": "diff --git a/euth_wagtail/settings/base.py b/euth_wagtail/settings/base.py\n--- a/euth_wagtail/settings/base.py\n+++ b/euth_wagtail/settings/base.py\n@@ -317,6 +317,14 @@\n ACCOUNT_LOGOUT_REDIRECT_URL = '/'\n SOCIALACCOUNT_EMAIL_VERIFICATION = False\n \n+# Rest framework\n+\n+REST_FRAMEWORK = {\n+    'DEFAULT_PARSER_CLASSES': (\n+        'rest_framework.parsers.JSONParser',\n+    )\n+}\n+\n # Euth settings\n \n COMMENTABLES = (\n", "issue": "fix function in api.js to use contenttype json and fix all react components\n\n", "before_files": [{"content": "\"\"\"\nDjango settings for euth_wagtail project.\n\nGenerated by 'django-admin startproject' using Django 1.9.1.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.9/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.9/ref/settings/\n\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nfrom django.utils.translation import ugettext_lazy as _\n\nPROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nBASE_DIR = os.path.dirname(PROJECT_DIR)\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'home',\n\n    'wagtail.wagtailforms',\n    'wagtail.wagtailredirects',\n    'wagtail.wagtailembeds',\n    'wagtail.wagtailsites',\n    'wagtail.wagtailusers',\n    'wagtail.wagtailsnippets',\n    'wagtail.wagtaildocs',\n    'wagtail.wagtailimages',\n    'wagtail.wagtailsearch',\n    'wagtail.wagtailadmin',\n    'wagtail.wagtailcore',\n    'wagtail.contrib.wagtailstyleguide',\n\n    'modelcluster',\n    'compressor',\n    'taggit',\n    'widget_tweaks',\n    'webpack_loader',\n    'easy_thumbnails',\n    'parler',\n    'ckeditor',\n    'ckeditor_uploader',\n\n    'django.contrib.sites',\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django_countries',\n    'rest_framework',\n    'autofixture',\n    'rules.apps.AutodiscoverRulesConfig',\n    'allauth',\n    'allauth.account',\n    'allauth.socialaccount',\n\n    'euth.users.apps.UsersConfig',\n    'euth.organisations.apps.OrganisationsConfig',\n    'euth.projects.apps.ProjectsConfig',\n    'euth.comments.apps.CommentConfig',\n    'euth.phases.apps.PhasesConfig',\n    'euth.modules.apps.ModuleConfig',\n    'euth.ideas.apps.IdeaConfig',\n    'euth.ratings.apps.RatingsConfig',\n    'euth.reports.apps.ReportConfig',\n    'euth.dashboard.apps.DashboardConfig',\n    'euth.memberships.apps.MembershipsConfig',\n    'euth.documents.apps.DocumentConfig',\n    'euth.flashpoll.apps.FlashpollConfig',\n    'euth.contrib',\n]\n\nMIDDLEWARE_CLASSES = [\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'django.middleware.security.SecurityMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\n    'wagtail.wagtailcore.middleware.SiteMiddleware',\n    'wagtail.wagtailredirects.middleware.RedirectMiddleware',\n]\n\nSITE_ID = 1\n\nROOT_URLCONF = 'euth_wagtail.urls'\n\nLOCALE_PATHS = [os.path.join(BASE_DIR, 'locale')]\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [\n            os.path.join(PROJECT_DIR, 'templates'),\n        ],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'euth_wagtail.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.9/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n        'TEST': {\n            'NAME': os.path.join(BASE_DIR, 'test_db.sqlite3'),\n        }\n    }\n}\n\n\n# Auth\n# https://docs.djangoproject.com/en/1.8/topics/auth/customizing/\n\nAUTH_USER_MODEL = 'euth_users.User'\n\nAUTHENTICATION_BACKENDS = (\n    'rules.permissions.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend',\n    'allauth.account.auth_backends.AuthenticationBackend',\n)\n\nCKEDITOR_UPLOAD_PATH = \"uploads/\"\nCKEDITOR_ALLOW_NONIMAGE_FILES = False\n\nCKEDITOR_CONFIGS = {\n    'default': {\n        'width': '100%',\n        'toolbar': 'Custom',\n        'toolbar_Custom': [\n            ['Bold', 'Italic', 'Underline'],\n            ['NumberedList', 'BulletedList'],\n            ['Link', 'Unlink']\n        ]\n    },\n    'image-editor': {\n        'width': '100%',\n        'toolbar': 'Custom',\n        'toolbar_Custom': [\n            ['Bold', 'Italic', 'Underline'],\n            ['Image'],\n            ['NumberedList', 'BulletedList'],\n            ['Link', 'Unlink']\n        ]\n    }\n}\n\nBLEACH_LIST = {\n    'default' : {\n        'tags': ['p','strong','em','u','ol','li','ul','a'],\n        'attributes': {\n            'a': ['href', 'rel'],\n        },\n    },\n    'image-editor': {\n        'tags': ['p','strong','em','u','ol','li','ul','a','img'],\n        'attributes': {\n            'a': ['href', 'rel'],\n            'img': ['src', 'alt', 'style']\n        },\n        'styles': [\n            'float',\n            'margin',\n            'padding',\n            'width',\n            'height',\n            'margin-bottom',\n            'margin-top',\n            'margin-left',\n            'margin-right',\n        ],\n    }\n}\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.9/topics/i18n/\n\nLANGUAGE_CODE = 'en'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\nLANGUAGES = [\n    ('en', _('English')),\n    ('de', _('German')),\n    ('it', _('Italien')),\n    ('fr', _('French')),\n    ('sv', _('Swedish')),\n    ('sl', _('Slovene')),\n    ('da', _('Danish')),\n]\n\nPARLER_LANGUAGES = {\n    1:[{'code': language_code } for language_code, language in LANGUAGES]\n}\n\n# fixtures\n\nFIXTURE_DIRS = [ os.path.join(PROJECT_DIR, 'fixtures') ]\n\nALLOWED_UPLOAD_IMAGES = ('image/png', 'image/jpeg', 'image/gif')\n\nTHUMBNAIL_ALIASES = {\n    '': {\n        'heroimage': {'size': (1500, 500), 'crop': 'smart'},\n        'project_thumbnail': {'size': (520, 330), 'crop': 'smart'},\n        'idea_image': {'size': (800, 0), 'crop': 'scale'},\n        'organisation_thumbnail': {'size': (740, 540), 'crop': 'smart'},\n        'avatar_small': {'size': (60, 60), 'crop': 'smart'},\n        'org_avatar_small': {'size': (60, 60), 'crop': 'scale'},\n        'org_avatar_medium': {'size': (200, 200), 'crop': 'scale'},\n    }\n}\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.9/howto/static-files/\n\nSTATICFILES_FINDERS = [\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    'compressor.finders.CompressorFinder',\n]\n\n\nWEBPACK_LOADER = {\n    'DEFAULT': {\n        'CACHE': False,\n        'BUNDLE_DIR_NAME': 'bundles/', # must end with slash\n        'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),\n        'POLL_INTERVAL': 0.1,\n        'IGNORE': ['.+\\.hot-update.js', '.+\\.map']\n    }\n}\n\n\nSTATICFILES_DIRS = [\n    os.path.join(BASE_DIR, 'node_modules/jquery/dist'),\n    os.path.join(BASE_DIR, 'node_modules/salvattore/dist'),\n    os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/javascripts'),\n    os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/stylesheets'),\n    os.path.join(BASE_DIR, 'node_modules/font-awesome'),\n    os.path.join(BASE_DIR, 'node_modules/owl.carousel/dist'),\n    os.path.join(BASE_DIR, 'node_modules/flatpickr/assets'),\n    os.path.join(BASE_DIR, 'node_modules/flatpickr/dist'),\n    os.path.join(PROJECT_DIR, 'static'),\n]\n\nSTATIC_ROOT = os.path.join(BASE_DIR, 'static')\nSTATIC_URL = '/static/'\n\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\nMEDIA_URL = '/media/'\n\nCOMPRESS_PRECOMPILERS = (\n    ('text/x-scss', 'django_libsass.SassCompiler'),\n)\nLIBSASS_SOURCEMAPS = True\n\nEMAIL_SUBJECT_PREFIX = '[OPIN] '\n\n# Wagtail settings\n\nWAGTAIL_SITE_NAME = \"euth_wagtail\"\n\n# Authentification\n\nLOGIN_URL = 'account_login'\nLOGOUT_URL = 'account_logout'\nLOGIN_REDIRECT_URL = '/'\n\nACCOUNT_ADAPTER = 'euth.users.adapters.EuthAccountAdapter'\nACCOUNT_AUTHENTICATION_METHOD = 'email'\nACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3\nACCOUNT_EMAIL_REQUIRED = True\nACCOUNT_EMAIL_SUBJECT_PREFIX = EMAIL_SUBJECT_PREFIX\nACCOUNT_EMAIL_VERIFICATION = 'mandatory'\nACCOUNT_SIGNUP_FORM_CLASS = 'euth.users.forms.SignUpForm'\nACCOUNT_USER_DISPLAY = 'euth.users.services.account_user_display'\nACCOUNT_USER_MODEL_USERNAME_FIELD = 'username'\nACCOUNT_USERNAME_REQUIRED = True\nACCOUNT_LOGIN_ATTEMPTS_LIMIT = 10\nACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 300  # seconds\nACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True\nACCOUNT_LOGIN_ON_PASSWORD_RESET = True\nACCOUNT_LOGOUT_REDIRECT_URL = '/'\nSOCIALACCOUNT_EMAIL_VERIFICATION = False\n\n# Euth settings\n\nCOMMENTABLES = (\n    ('euth_ideas', 'idea'),\n    ('euth_documents', 'paragraph'),\n    ('euth_documents', 'document'),\n    ('euth_comments', 'comment'),\n)\n\nRATEABLES = COMMENTABLES\n\nREPORTABLES = COMMENTABLES\n\nFLASHPOLL_URL = \"https://opin.flashpoll.eu/\"\n", "path": "euth_wagtail/settings/base.py"}], "after_files": [{"content": "\"\"\"\nDjango settings for euth_wagtail project.\n\nGenerated by 'django-admin startproject' using Django 1.9.1.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.9/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.9/ref/settings/\n\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nfrom django.utils.translation import ugettext_lazy as _\n\nPROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nBASE_DIR = os.path.dirname(PROJECT_DIR)\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'home',\n\n    'wagtail.wagtailforms',\n    'wagtail.wagtailredirects',\n    'wagtail.wagtailembeds',\n    'wagtail.wagtailsites',\n    'wagtail.wagtailusers',\n    'wagtail.wagtailsnippets',\n    'wagtail.wagtaildocs',\n    'wagtail.wagtailimages',\n    'wagtail.wagtailsearch',\n    'wagtail.wagtailadmin',\n    'wagtail.wagtailcore',\n    'wagtail.contrib.wagtailstyleguide',\n\n    'modelcluster',\n    'compressor',\n    'taggit',\n    'widget_tweaks',\n    'webpack_loader',\n    'easy_thumbnails',\n    'parler',\n    'ckeditor',\n    'ckeditor_uploader',\n\n    'django.contrib.sites',\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django_countries',\n    'rest_framework',\n    'autofixture',\n    'rules.apps.AutodiscoverRulesConfig',\n    'allauth',\n    'allauth.account',\n    'allauth.socialaccount',\n\n    'euth.users.apps.UsersConfig',\n    'euth.organisations.apps.OrganisationsConfig',\n    'euth.projects.apps.ProjectsConfig',\n    'euth.comments.apps.CommentConfig',\n    'euth.phases.apps.PhasesConfig',\n    'euth.modules.apps.ModuleConfig',\n    'euth.ideas.apps.IdeaConfig',\n    'euth.ratings.apps.RatingsConfig',\n    'euth.reports.apps.ReportConfig',\n    'euth.dashboard.apps.DashboardConfig',\n    'euth.memberships.apps.MembershipsConfig',\n    'euth.documents.apps.DocumentConfig',\n    'euth.flashpoll.apps.FlashpollConfig',\n    'euth.contrib',\n]\n\nMIDDLEWARE_CLASSES = [\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'django.middleware.security.SecurityMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\n    'wagtail.wagtailcore.middleware.SiteMiddleware',\n    'wagtail.wagtailredirects.middleware.RedirectMiddleware',\n]\n\nSITE_ID = 1\n\nROOT_URLCONF = 'euth_wagtail.urls'\n\nLOCALE_PATHS = [os.path.join(BASE_DIR, 'locale')]\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [\n            os.path.join(PROJECT_DIR, 'templates'),\n        ],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'euth_wagtail.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.9/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n        'TEST': {\n            'NAME': os.path.join(BASE_DIR, 'test_db.sqlite3'),\n        }\n    }\n}\n\n\n# Auth\n# https://docs.djangoproject.com/en/1.8/topics/auth/customizing/\n\nAUTH_USER_MODEL = 'euth_users.User'\n\nAUTHENTICATION_BACKENDS = (\n    'rules.permissions.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend',\n    'allauth.account.auth_backends.AuthenticationBackend',\n)\n\nCKEDITOR_UPLOAD_PATH = \"uploads/\"\nCKEDITOR_ALLOW_NONIMAGE_FILES = False\n\nCKEDITOR_CONFIGS = {\n    'default': {\n        'width': '100%',\n        'toolbar': 'Custom',\n        'toolbar_Custom': [\n            ['Bold', 'Italic', 'Underline'],\n            ['NumberedList', 'BulletedList'],\n            ['Link', 'Unlink']\n        ]\n    },\n    'image-editor': {\n        'width': '100%',\n        'toolbar': 'Custom',\n        'toolbar_Custom': [\n            ['Bold', 'Italic', 'Underline'],\n            ['Image'],\n            ['NumberedList', 'BulletedList'],\n            ['Link', 'Unlink']\n        ]\n    }\n}\n\nBLEACH_LIST = {\n    'default' : {\n        'tags': ['p','strong','em','u','ol','li','ul','a'],\n        'attributes': {\n            'a': ['href', 'rel'],\n        },\n    },\n    'image-editor': {\n        'tags': ['p','strong','em','u','ol','li','ul','a','img'],\n        'attributes': {\n            'a': ['href', 'rel'],\n            'img': ['src', 'alt', 'style']\n        },\n        'styles': [\n            'float',\n            'margin',\n            'padding',\n            'width',\n            'height',\n            'margin-bottom',\n            'margin-top',\n            'margin-left',\n            'margin-right',\n        ],\n    }\n}\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.9/topics/i18n/\n\nLANGUAGE_CODE = 'en'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\nLANGUAGES = [\n    ('en', _('English')),\n    ('de', _('German')),\n    ('it', _('Italien')),\n    ('fr', _('French')),\n    ('sv', _('Swedish')),\n    ('sl', _('Slovene')),\n    ('da', _('Danish')),\n]\n\nPARLER_LANGUAGES = {\n    1:[{'code': language_code } for language_code, language in LANGUAGES]\n}\n\n# fixtures\n\nFIXTURE_DIRS = [ os.path.join(PROJECT_DIR, 'fixtures') ]\n\nALLOWED_UPLOAD_IMAGES = ('image/png', 'image/jpeg', 'image/gif')\n\nTHUMBNAIL_ALIASES = {\n    '': {\n        'heroimage': {'size': (1500, 500), 'crop': 'smart'},\n        'project_thumbnail': {'size': (520, 330), 'crop': 'smart'},\n        'idea_image': {'size': (800, 0), 'crop': 'scale'},\n        'organisation_thumbnail': {'size': (740, 540), 'crop': 'smart'},\n        'avatar_small': {'size': (60, 60), 'crop': 'smart'},\n        'org_avatar_small': {'size': (60, 60), 'crop': 'scale'},\n        'org_avatar_medium': {'size': (200, 200), 'crop': 'scale'},\n    }\n}\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.9/howto/static-files/\n\nSTATICFILES_FINDERS = [\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    'compressor.finders.CompressorFinder',\n]\n\n\nWEBPACK_LOADER = {\n    'DEFAULT': {\n        'CACHE': False,\n        'BUNDLE_DIR_NAME': 'bundles/', # must end with slash\n        'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),\n        'POLL_INTERVAL': 0.1,\n        'IGNORE': ['.+\\.hot-update.js', '.+\\.map']\n    }\n}\n\n\nSTATICFILES_DIRS = [\n    os.path.join(BASE_DIR, 'node_modules/jquery/dist'),\n    os.path.join(BASE_DIR, 'node_modules/salvattore/dist'),\n    os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/javascripts'),\n    os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/stylesheets'),\n    os.path.join(BASE_DIR, 'node_modules/font-awesome'),\n    os.path.join(BASE_DIR, 'node_modules/owl.carousel/dist'),\n    os.path.join(BASE_DIR, 'node_modules/flatpickr/assets'),\n    os.path.join(BASE_DIR, 'node_modules/flatpickr/dist'),\n    os.path.join(PROJECT_DIR, 'static'),\n]\n\nSTATIC_ROOT = os.path.join(BASE_DIR, 'static')\nSTATIC_URL = '/static/'\n\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\nMEDIA_URL = '/media/'\n\nCOMPRESS_PRECOMPILERS = (\n    ('text/x-scss', 'django_libsass.SassCompiler'),\n)\nLIBSASS_SOURCEMAPS = True\n\nEMAIL_SUBJECT_PREFIX = '[OPIN] '\n\n# Wagtail settings\n\nWAGTAIL_SITE_NAME = \"euth_wagtail\"\n\n# Authentification\n\nLOGIN_URL = 'account_login'\nLOGOUT_URL = 'account_logout'\nLOGIN_REDIRECT_URL = '/'\n\nACCOUNT_ADAPTER = 'euth.users.adapters.EuthAccountAdapter'\nACCOUNT_AUTHENTICATION_METHOD = 'email'\nACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3\nACCOUNT_EMAIL_REQUIRED = True\nACCOUNT_EMAIL_SUBJECT_PREFIX = EMAIL_SUBJECT_PREFIX\nACCOUNT_EMAIL_VERIFICATION = 'mandatory'\nACCOUNT_SIGNUP_FORM_CLASS = 'euth.users.forms.SignUpForm'\nACCOUNT_USER_DISPLAY = 'euth.users.services.account_user_display'\nACCOUNT_USER_MODEL_USERNAME_FIELD = 'username'\nACCOUNT_USERNAME_REQUIRED = True\nACCOUNT_LOGIN_ATTEMPTS_LIMIT = 10\nACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 300  # seconds\nACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True\nACCOUNT_LOGIN_ON_PASSWORD_RESET = True\nACCOUNT_LOGOUT_REDIRECT_URL = '/'\nSOCIALACCOUNT_EMAIL_VERIFICATION = False\n\n# Rest framework\n\nREST_FRAMEWORK = {\n    'DEFAULT_PARSER_CLASSES': (\n        'rest_framework.parsers.JSONParser',\n    )\n}\n\n# Euth settings\n\nCOMMENTABLES = (\n    ('euth_ideas', 'idea'),\n    ('euth_documents', 'paragraph'),\n    ('euth_documents', 'document'),\n    ('euth_comments', 'comment'),\n)\n\nRATEABLES = COMMENTABLES\n\nREPORTABLES = COMMENTABLES\n\nFLASHPOLL_URL = \"https://opin.flashpoll.eu/\"\n", "path": "euth_wagtail/settings/base.py"}]}