We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
HTML editor in create-text process not fully working
The HTML editor in create-text-process not working. I currently can't add links to other website or upload pictures ;)

<img width="803" alt="bildschirmfoto 2017-02-13 um 17 24 40" src="https://cloud.githubusercontent.com/assets/11075214/22891998/5bc735ac-f211-11e6-8766-a7588873b436.png">


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `meinberlin/urls.py`
Content:
```
1 """meinberlin URL Configuration."""
2 
3 from allauth import urls as allauth_urls
4 from ckeditor_uploader import views as ck_views
5 from django.conf.urls import include
6 from django.conf.urls import url
7 from django.contrib import admin
8 from django.contrib.auth.decorators import login_required
9 from django.views.decorators.cache import never_cache
10 from django.views.i18n import javascript_catalog
11 from rest_framework import routers
12 from wagtail.wagtailadmin import urls as wagtailadmin_urls
13 from wagtail.wagtailcore import urls as wagtail_urls
14 from wagtail.wagtaildocs import urls as wagtaildocs_urls
15 
16 from adhocracy4.comments.api import CommentViewSet
17 from adhocracy4.projects import urls as projects_urls
18 from adhocracy4.ratings.api import RatingViewSet
19 
20 from apps.dashboard import urls as dashboard_urls
21 from apps.documents import urls as paragraph_urls
22 from apps.documents.api import DocumentViewSet
23 from apps.ideas import urls as ideas_urls
24 
25 js_info_dict = {
26     'packages': ('adhocracy4.comments',),
27 }
28 
29 router = routers.DefaultRouter()
30 router.register(r'ratings', RatingViewSet, base_name='ratings')
31 router.register(r'comments', CommentViewSet, base_name='comments')
32 router.register(r'documents', DocumentViewSet, base_name='documents')
33 
34 
35 urlpatterns = [
36     url(r'^django-admin/', include(admin.site.urls)),
37     url(r'^dashboard/', include(dashboard_urls)),
38 
39     url(r'^admin/', include(wagtailadmin_urls)),
40     url(r'^accounts/', include(allauth_urls)),
41     url(r'^documents/', include(wagtaildocs_urls)),
42     url(r'^projects/', include(projects_urls)),
43 
44     url(r'^ideas/', include(ideas_urls)),
45     url(r'^paragraphs/', include(paragraph_urls)),
46 
47     url(r'^api/', include(router.urls)),
48 
49     url(r'^upload/',
50         login_required(ck_views.upload), name='ckeditor_upload'),
51     url(r'^browse/',
52         never_cache(login_required(ck_views.browse)), name='ckeditor_browse'),
53 
54     url(r'^jsi18n/$', javascript_catalog,
55         js_info_dict, name='javascript-catalog'),
56     url(r'', include(wagtail_urls)),
57 ]
58
```

Path: `meinberlin/settings/base.py`
Content:
```
1 """
2 Django settings for meinberlin project.
3 
4 Generated by 'django-admin startproject' using Django 1.8.17.
5 
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.8/topics/settings/
8 
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.8/ref/settings/
11 """
12 
13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 import os
15 
16 PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 BASE_DIR = os.path.dirname(PROJECT_DIR)
18 
19 # Application definition
20 
21 INSTALLED_APPS = (
22     'django.contrib.sites',
23     'django.contrib.admin',
24     'django.contrib.auth',
25     'django.contrib.contenttypes',
26     'django.contrib.sessions',
27     'django.contrib.messages',
28     'django.contrib.staticfiles',
29 
30     'wagtail.wagtailforms',
31     'wagtail.wagtailredirects',
32     'wagtail.wagtailembeds',
33     'wagtail.wagtailsites',
34     'wagtail.wagtailusers',
35     'wagtail.wagtailsnippets',
36     'wagtail.wagtaildocs',
37     'wagtail.wagtailimages',
38     'wagtail.wagtailsearch',
39     'wagtail.wagtailadmin',
40     'wagtail.wagtailcore',
41     'wagtail.contrib.wagtailstyleguide',
42 
43     'taggit',  # wagtail dependency
44     'rest_framework',
45     'allauth',
46     'allauth.account',
47     'allauth.socialaccount',
48     'rules.apps.AutodiscoverRulesConfig',
49     'easy_thumbnails',
50     'ckeditor',
51     'ckeditor_uploader',
52 
53     'adhocracy4.contrib.apps.ContribConfig',
54     'adhocracy4.organisations.apps.OrganisationsConfig',
55     'adhocracy4.projects.apps.ProjectsConfig',
56     'adhocracy4.phases.apps.PhasesConfig',
57     'adhocracy4.modules.apps.ModulesConfig',
58     'adhocracy4.ratings.apps.RatingsConfig',
59     'adhocracy4.comments.apps.CommentsConfig',
60 
61     'apps.contrib.apps.Config',
62     'apps.cms.apps.Config',
63     'apps.users.apps.Config',
64     'apps.projects.apps.Config',
65     'apps.organisations.apps.Config',
66     'apps.dashboard.apps.Config',
67 
68     'apps.ideas.apps.Config',
69     'apps.documents.apps.Config',
70 )
71 
72 MIDDLEWARE_CLASSES = (
73     'django.contrib.sessions.middleware.SessionMiddleware',
74     'django.middleware.common.CommonMiddleware',
75     'django.middleware.csrf.CsrfViewMiddleware',
76     'django.contrib.auth.middleware.AuthenticationMiddleware',
77     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
78     'django.contrib.messages.middleware.MessageMiddleware',
79     'django.middleware.clickjacking.XFrameOptionsMiddleware',
80     'django.middleware.security.SecurityMiddleware',
81     'django.middleware.locale.LocaleMiddleware',
82 
83     'wagtail.wagtailcore.middleware.SiteMiddleware',
84     'wagtail.wagtailredirects.middleware.RedirectMiddleware',
85 )
86 
87 SITE_ID = 1
88 
89 ROOT_URLCONF = 'meinberlin.urls'
90 
91 LOCALE_PATHS = [os.path.join(PROJECT_DIR, 'locale')]
92 
93 TEMPLATES = [
94     {
95         'BACKEND': 'django.template.backends.django.DjangoTemplates',
96         'DIRS': [
97             os.path.join(PROJECT_DIR, 'templates'),
98         ],
99         'APP_DIRS': True,
100         'OPTIONS': {
101             'context_processors': [
102                 'django.template.context_processors.debug',
103                 'django.template.context_processors.request',
104                 'django.contrib.auth.context_processors.auth',
105                 'django.contrib.messages.context_processors.messages',
106             ],
107         },
108     },
109 ]
110 
111 WSGI_APPLICATION = 'meinberlin.wsgi.application'
112 
113 
114 # Database
115 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
116 
117 DATABASES = {
118     'default': {
119         'ENGINE': 'django.db.backends.sqlite3',
120         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
121     }
122 }
123 
124 
125 # Internationalization
126 # https://docs.djangoproject.com/en/1.8/topics/i18n/
127 
128 LANGUAGE_CODE = 'en-us'
129 
130 TIME_ZONE = 'UTC'
131 
132 USE_I18N = True
133 
134 USE_L10N = True
135 
136 USE_TZ = True
137 
138 
139 # Static files (CSS, JavaScript, Images)
140 # https://docs.djangoproject.com/en/1.8/howto/static-files/
141 
142 STATICFILES_DIRS = [
143     os.path.join(PROJECT_DIR, 'static'),
144 ]
145 
146 STATIC_ROOT = os.path.join(BASE_DIR, 'static')
147 STATIC_URL = '/static/'
148 
149 IMAGE_ALIASES = {
150     '*': {
151         'max_size': 5*10**6,
152         'fileformats': ('image/png', 'image/jpeg', 'image/gif')
153     },
154     'heroimage': {'min_resolution': (1300, 600)},
155     'logo': {'min_resolution': (200, 200), 'aspect_ratio': (1, 1)},
156     'avatar': {'min_resolution': (200, 200)},
157     'idea_image': {'min_resolution': (800, 200)},
158 }
159 
160 ALLOWED_UPLOAD_IMAGES = ('png', 'jpeg', 'gif')
161 
162 
163 # Wagtail settings
164 
165 WAGTAIL_SITE_NAME = 'meinberlin'
166 
167 # Base URL to use when referring to full URLs within the Wagtail admin backend -
168 # e.g. in notification emails. Don't include '/admin' or a trailing slash
169 BASE_URL = 'http://localhost:8000'
170 
171 # Authentication
172 
173 AUTH_USER_MODEL = 'meinberlin_users.User'
174 
175 AUTHENTICATION_BACKENDS = (
176     'rules.permissions.ObjectPermissionBackend',
177     'django.contrib.auth.backends.ModelBackend',
178     'allauth.account.auth_backends.AuthenticationBackend',
179 )
180 
181 ACCOUNT_ADAPTER = 'apps.users.adapters.AccountAdapter'
182 ACCOUNT_AUTHENTICATION_METHOD = 'email'
183 ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3
184 ACCOUNT_EMAIL_REQUIRED = True
185 ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
186 ACCOUNT_USERNAME_REQUIRED = True
187 ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 10
188 ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 300  # seconds
189 ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True
190 ACCOUNT_LOGIN_ON_PASSWORD_RESET = True
191 
192 LOGIN_REDIRECT_URL = '/'
193 
194 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
195 
196 
197 # ckeditor
198 
199 CKEDITOR_UPLOAD_PATH = "uploads/"
200 CKEDITOR_RESTRICT_BY_USER = True
201 CKEDITOR_ALLOW_NONIMAGE_FILES = False
202 
203 CKEDITOR_CONFIGS = {
204     'default': {
205         'width': '100%',
206         'toolbar': 'Custom',
207         'toolbar_Custom': [
208             ['Bold', 'Italic', 'Underline'],
209             ['NumberedList', 'BulletedList'],
210             ['Link', 'Unlink']
211         ]
212     },
213     'image-editor': {
214         'width': '100%',
215         'toolbar': 'Custom',
216         'toolbar_Custom': [
217             ['Bold', 'Italic', 'Underline'],
218             ['Image'],
219             ['NumberedList', 'BulletedList'],
220             ['Link', 'Unlink']
221         ]
222     }
223 }
224 
225 BLEACH_LIST = {
226     'default' : {
227         'tags': ['p','strong','em','u','ol','li','ul','a'],
228         'attributes': {
229             'a': ['href', 'rel'],
230         },
231     },
232     'image-editor': {
233         'tags': ['p','strong','em','u','ol','li','ul','a','img'],
234         'attributes': {
235             'a': ['href', 'rel'],
236             'img': ['src', 'alt', 'style']
237         },
238         'styles': [
239             'float',
240             'margin',
241             'padding',
242             'width',
243             'height',
244             'margin-bottom',
245             'margin-top',
246             'margin-left',
247             'margin-right',
248         ],
249     }
250 }
251 
252 
253 # adhocracy4
254 
255 A4_ORGANISATIONS_MODEL = 'meinberlin_organisations.Organisation'
256 
257 A4_RATEABLES = (
258     ('meinberlin_ideas', 'idea'),
259 )
260 
261 A4_COMMENTABLES = (
262     ('meinberlin_ideas', 'idea'),
263 )
264
```
--- 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/meinberlin/settings/base.py b/meinberlin/settings/base.py
--- a/meinberlin/settings/base.py
+++ b/meinberlin/settings/base.py
@@ -146,6 +146,9 @@
 STATIC_ROOT = os.path.join(BASE_DIR, 'static')
 STATIC_URL = '/static/'
 
+MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
+MEDIA_URL = '/media/'
+
 IMAGE_ALIASES = {
     '*': {
         'max_size': 5*10**6,
diff --git a/meinberlin/urls.py b/meinberlin/urls.py
--- a/meinberlin/urls.py
+++ b/meinberlin/urls.py
@@ -2,6 +2,7 @@
 
 from allauth import urls as allauth_urls
 from ckeditor_uploader import views as ck_views
+from django.conf import settings
 from django.conf.urls import include
 from django.conf.urls import url
 from django.contrib import admin
@@ -55,3 +56,12 @@
         js_info_dict, name='javascript-catalog'),
     url(r'', include(wagtail_urls)),
 ]
+
+if settings.DEBUG:
+    from django.conf.urls.static import static
+    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
+
+    # Serve static and media locally
+    urlpatterns += staticfiles_urlpatterns()
+    urlpatterns += static(settings.MEDIA_URL,
+                          document_root=settings.MEDIA_ROOT)

{"golden_diff": "diff --git a/meinberlin/settings/base.py b/meinberlin/settings/base.py\n--- a/meinberlin/settings/base.py\n+++ b/meinberlin/settings/base.py\n@@ -146,6 +146,9 @@\n STATIC_ROOT = os.path.join(BASE_DIR, 'static')\n STATIC_URL = '/static/'\n \n+MEDIA_ROOT = os.path.join(BASE_DIR, 'media')\n+MEDIA_URL = '/media/'\n+\n IMAGE_ALIASES = {\n     '*': {\n         'max_size': 5*10**6,\ndiff --git a/meinberlin/urls.py b/meinberlin/urls.py\n--- a/meinberlin/urls.py\n+++ b/meinberlin/urls.py\n@@ -2,6 +2,7 @@\n \n from allauth import urls as allauth_urls\n from ckeditor_uploader import views as ck_views\n+from django.conf import settings\n from django.conf.urls import include\n from django.conf.urls import url\n from django.contrib import admin\n@@ -55,3 +56,12 @@\n         js_info_dict, name='javascript-catalog'),\n     url(r'', include(wagtail_urls)),\n ]\n+\n+if settings.DEBUG:\n+    from django.conf.urls.static import static\n+    from django.contrib.staticfiles.urls import staticfiles_urlpatterns\n+\n+    # Serve static and media locally\n+    urlpatterns += staticfiles_urlpatterns()\n+    urlpatterns += static(settings.MEDIA_URL,\n+                          document_root=settings.MEDIA_ROOT)\n", "issue": "HTML editor in create-text process not fully working\nThe HTML editor in create-text-process not working. I currently can't add links to other website or upload pictures ;)\r\n\r\n<img width=\"803\" alt=\"bildschirmfoto 2017-02-13 um 17 24 40\" src=\"https://cloud.githubusercontent.com/assets/11075214/22891998/5bc735ac-f211-11e6-8766-a7588873b436.png\">\r\n\n", "before_files": [{"content": "\"\"\"meinberlin URL Configuration.\"\"\"\n\nfrom allauth import urls as allauth_urls\nfrom ckeditor_uploader import views as ck_views\nfrom django.conf.urls import include\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.contrib.auth.decorators import login_required\nfrom django.views.decorators.cache import never_cache\nfrom django.views.i18n import javascript_catalog\nfrom rest_framework import routers\nfrom wagtail.wagtailadmin import urls as wagtailadmin_urls\nfrom wagtail.wagtailcore import urls as wagtail_urls\nfrom wagtail.wagtaildocs import urls as wagtaildocs_urls\n\nfrom adhocracy4.comments.api import CommentViewSet\nfrom adhocracy4.projects import urls as projects_urls\nfrom adhocracy4.ratings.api import RatingViewSet\n\nfrom apps.dashboard import urls as dashboard_urls\nfrom apps.documents import urls as paragraph_urls\nfrom apps.documents.api import DocumentViewSet\nfrom apps.ideas import urls as ideas_urls\n\njs_info_dict = {\n    'packages': ('adhocracy4.comments',),\n}\n\nrouter = routers.DefaultRouter()\nrouter.register(r'ratings', RatingViewSet, base_name='ratings')\nrouter.register(r'comments', CommentViewSet, base_name='comments')\nrouter.register(r'documents', DocumentViewSet, base_name='documents')\n\n\nurlpatterns = [\n    url(r'^django-admin/', include(admin.site.urls)),\n    url(r'^dashboard/', include(dashboard_urls)),\n\n    url(r'^admin/', include(wagtailadmin_urls)),\n    url(r'^accounts/', include(allauth_urls)),\n    url(r'^documents/', include(wagtaildocs_urls)),\n    url(r'^projects/', include(projects_urls)),\n\n    url(r'^ideas/', include(ideas_urls)),\n    url(r'^paragraphs/', include(paragraph_urls)),\n\n    url(r'^api/', include(router.urls)),\n\n    url(r'^upload/',\n        login_required(ck_views.upload), name='ckeditor_upload'),\n    url(r'^browse/',\n        never_cache(login_required(ck_views.browse)), name='ckeditor_browse'),\n\n    url(r'^jsi18n/$', javascript_catalog,\n        js_info_dict, name='javascript-catalog'),\n    url(r'', include(wagtail_urls)),\n]\n", "path": "meinberlin/urls.py"}, {"content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.8/ref/settings/\n\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nPROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nBASE_DIR = os.path.dirname(PROJECT_DIR)\n\n# Application definition\n\nINSTALLED_APPS = (\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\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    'taggit',  # wagtail dependency\n    'rest_framework',\n    'allauth',\n    'allauth.account',\n    'allauth.socialaccount',\n    'rules.apps.AutodiscoverRulesConfig',\n    'easy_thumbnails',\n    'ckeditor',\n    'ckeditor_uploader',\n\n    'adhocracy4.contrib.apps.ContribConfig',\n    'adhocracy4.organisations.apps.OrganisationsConfig',\n    'adhocracy4.projects.apps.ProjectsConfig',\n    'adhocracy4.phases.apps.PhasesConfig',\n    'adhocracy4.modules.apps.ModulesConfig',\n    'adhocracy4.ratings.apps.RatingsConfig',\n    'adhocracy4.comments.apps.CommentsConfig',\n\n    'apps.contrib.apps.Config',\n    'apps.cms.apps.Config',\n    'apps.users.apps.Config',\n    'apps.projects.apps.Config',\n    'apps.organisations.apps.Config',\n    'apps.dashboard.apps.Config',\n\n    'apps.ideas.apps.Config',\n    'apps.documents.apps.Config',\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\n    'wagtail.wagtailcore.middleware.SiteMiddleware',\n    'wagtail.wagtailredirects.middleware.RedirectMiddleware',\n)\n\nSITE_ID = 1\n\nROOT_URLCONF = 'meinberlin.urls'\n\nLOCALE_PATHS = [os.path.join(PROJECT_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 = 'meinberlin.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.8/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n    }\n}\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.8/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.8/howto/static-files/\n\nSTATICFILES_DIRS = [\n    os.path.join(PROJECT_DIR, 'static'),\n]\n\nSTATIC_ROOT = os.path.join(BASE_DIR, 'static')\nSTATIC_URL = '/static/'\n\nIMAGE_ALIASES = {\n    '*': {\n        'max_size': 5*10**6,\n        'fileformats': ('image/png', 'image/jpeg', 'image/gif')\n    },\n    'heroimage': {'min_resolution': (1300, 600)},\n    'logo': {'min_resolution': (200, 200), 'aspect_ratio': (1, 1)},\n    'avatar': {'min_resolution': (200, 200)},\n    'idea_image': {'min_resolution': (800, 200)},\n}\n\nALLOWED_UPLOAD_IMAGES = ('png', 'jpeg', 'gif')\n\n\n# Wagtail settings\n\nWAGTAIL_SITE_NAME = 'meinberlin'\n\n# Base URL to use when referring to full URLs within the Wagtail admin backend -\n# e.g. in notification emails. Don't include '/admin' or a trailing slash\nBASE_URL = 'http://localhost:8000'\n\n# Authentication\n\nAUTH_USER_MODEL = 'meinberlin_users.User'\n\nAUTHENTICATION_BACKENDS = (\n    'rules.permissions.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend',\n    'allauth.account.auth_backends.AuthenticationBackend',\n)\n\nACCOUNT_ADAPTER = 'apps.users.adapters.AccountAdapter'\nACCOUNT_AUTHENTICATION_METHOD = 'email'\nACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3\nACCOUNT_EMAIL_REQUIRED = True\nACCOUNT_EMAIL_VERIFICATION = 'mandatory'\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\n\nLOGIN_REDIRECT_URL = '/'\n\nEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\n\n# ckeditor\n\nCKEDITOR_UPLOAD_PATH = \"uploads/\"\nCKEDITOR_RESTRICT_BY_USER = True\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\n# adhocracy4\n\nA4_ORGANISATIONS_MODEL = 'meinberlin_organisations.Organisation'\n\nA4_RATEABLES = (\n    ('meinberlin_ideas', 'idea'),\n)\n\nA4_COMMENTABLES = (\n    ('meinberlin_ideas', 'idea'),\n)\n", "path": "meinberlin/settings/base.py"}], "after_files": [{"content": "\"\"\"meinberlin URL Configuration.\"\"\"\n\nfrom allauth import urls as allauth_urls\nfrom ckeditor_uploader import views as ck_views\nfrom django.conf import settings\nfrom django.conf.urls import include\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.contrib.auth.decorators import login_required\nfrom django.views.decorators.cache import never_cache\nfrom django.views.i18n import javascript_catalog\nfrom rest_framework import routers\nfrom wagtail.wagtailadmin import urls as wagtailadmin_urls\nfrom wagtail.wagtailcore import urls as wagtail_urls\nfrom wagtail.wagtaildocs import urls as wagtaildocs_urls\n\nfrom adhocracy4.comments.api import CommentViewSet\nfrom adhocracy4.projects import urls as projects_urls\nfrom adhocracy4.ratings.api import RatingViewSet\n\nfrom apps.dashboard import urls as dashboard_urls\nfrom apps.documents import urls as paragraph_urls\nfrom apps.documents.api import DocumentViewSet\nfrom apps.ideas import urls as ideas_urls\n\njs_info_dict = {\n    'packages': ('adhocracy4.comments',),\n}\n\nrouter = routers.DefaultRouter()\nrouter.register(r'ratings', RatingViewSet, base_name='ratings')\nrouter.register(r'comments', CommentViewSet, base_name='comments')\nrouter.register(r'documents', DocumentViewSet, base_name='documents')\n\n\nurlpatterns = [\n    url(r'^django-admin/', include(admin.site.urls)),\n    url(r'^dashboard/', include(dashboard_urls)),\n\n    url(r'^admin/', include(wagtailadmin_urls)),\n    url(r'^accounts/', include(allauth_urls)),\n    url(r'^documents/', include(wagtaildocs_urls)),\n    url(r'^projects/', include(projects_urls)),\n\n    url(r'^ideas/', include(ideas_urls)),\n    url(r'^paragraphs/', include(paragraph_urls)),\n\n    url(r'^api/', include(router.urls)),\n\n    url(r'^upload/',\n        login_required(ck_views.upload), name='ckeditor_upload'),\n    url(r'^browse/',\n        never_cache(login_required(ck_views.browse)), name='ckeditor_browse'),\n\n    url(r'^jsi18n/$', javascript_catalog,\n        js_info_dict, name='javascript-catalog'),\n    url(r'', include(wagtail_urls)),\n]\n\nif settings.DEBUG:\n    from django.conf.urls.static import static\n    from django.contrib.staticfiles.urls import staticfiles_urlpatterns\n\n    # Serve static and media locally\n    urlpatterns += staticfiles_urlpatterns()\n    urlpatterns += static(settings.MEDIA_URL,\n                          document_root=settings.MEDIA_ROOT)\n", "path": "meinberlin/urls.py"}, {"content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.8/ref/settings/\n\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nPROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nBASE_DIR = os.path.dirname(PROJECT_DIR)\n\n# Application definition\n\nINSTALLED_APPS = (\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\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    'taggit',  # wagtail dependency\n    'rest_framework',\n    'allauth',\n    'allauth.account',\n    'allauth.socialaccount',\n    'rules.apps.AutodiscoverRulesConfig',\n    'easy_thumbnails',\n    'ckeditor',\n    'ckeditor_uploader',\n\n    'adhocracy4.contrib.apps.ContribConfig',\n    'adhocracy4.organisations.apps.OrganisationsConfig',\n    'adhocracy4.projects.apps.ProjectsConfig',\n    'adhocracy4.phases.apps.PhasesConfig',\n    'adhocracy4.modules.apps.ModulesConfig',\n    'adhocracy4.ratings.apps.RatingsConfig',\n    'adhocracy4.comments.apps.CommentsConfig',\n\n    'apps.contrib.apps.Config',\n    'apps.cms.apps.Config',\n    'apps.users.apps.Config',\n    'apps.projects.apps.Config',\n    'apps.organisations.apps.Config',\n    'apps.dashboard.apps.Config',\n\n    'apps.ideas.apps.Config',\n    'apps.documents.apps.Config',\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\n    'wagtail.wagtailcore.middleware.SiteMiddleware',\n    'wagtail.wagtailredirects.middleware.RedirectMiddleware',\n)\n\nSITE_ID = 1\n\nROOT_URLCONF = 'meinberlin.urls'\n\nLOCALE_PATHS = [os.path.join(PROJECT_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 = 'meinberlin.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.8/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n    }\n}\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.8/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.8/howto/static-files/\n\nSTATICFILES_DIRS = [\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\nIMAGE_ALIASES = {\n    '*': {\n        'max_size': 5*10**6,\n        'fileformats': ('image/png', 'image/jpeg', 'image/gif')\n    },\n    'heroimage': {'min_resolution': (1300, 600)},\n    'logo': {'min_resolution': (200, 200), 'aspect_ratio': (1, 1)},\n    'avatar': {'min_resolution': (200, 200)},\n    'idea_image': {'min_resolution': (800, 200)},\n}\n\nALLOWED_UPLOAD_IMAGES = ('png', 'jpeg', 'gif')\n\n\n# Wagtail settings\n\nWAGTAIL_SITE_NAME = 'meinberlin'\n\n# Base URL to use when referring to full URLs within the Wagtail admin backend -\n# e.g. in notification emails. Don't include '/admin' or a trailing slash\nBASE_URL = 'http://localhost:8000'\n\n# Authentication\n\nAUTH_USER_MODEL = 'meinberlin_users.User'\n\nAUTHENTICATION_BACKENDS = (\n    'rules.permissions.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend',\n    'allauth.account.auth_backends.AuthenticationBackend',\n)\n\nACCOUNT_ADAPTER = 'apps.users.adapters.AccountAdapter'\nACCOUNT_AUTHENTICATION_METHOD = 'email'\nACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 3\nACCOUNT_EMAIL_REQUIRED = True\nACCOUNT_EMAIL_VERIFICATION = 'mandatory'\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\n\nLOGIN_REDIRECT_URL = '/'\n\nEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\n\n# ckeditor\n\nCKEDITOR_UPLOAD_PATH = \"uploads/\"\nCKEDITOR_RESTRICT_BY_USER = True\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\n# adhocracy4\n\nA4_ORGANISATIONS_MODEL = 'meinberlin_organisations.Organisation'\n\nA4_RATEABLES = (\n    ('meinberlin_ideas', 'idea'),\n)\n\nA4_COMMENTABLES = (\n    ('meinberlin_ideas', 'idea'),\n)\n", "path": "meinberlin/settings/base.py"}]}