We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Styling in commenting text
Currently an the `<li>`s in an `<ul>` do not glow/highlight as expected when hovered. An the comment symbol is not part of the link / can't be clicked.


--- 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/documents/models.py`
Content:
```
1 from ckeditor.fields import RichTextField
2 from django.contrib.contenttypes.models import ContentType
3 from django.core.exceptions import ObjectDoesNotExist, ValidationError
4 from django.db import models
5 from django.utils.functional import cached_property
6 from django.utils.translation import ugettext_lazy as _
7 
8 from contrib.transforms import html_transforms
9 from euth.comments import models as comment_models
10 from euth.contrib import base_models
11 from euth.modules import models as module_models
12 
13 
14 class Document(module_models.Item):
15     name = models.CharField(max_length=120)
16 
17     def __str__(self):
18         return "{}_document_{}".format(str(self.module), self.pk)
19 
20     def clean(self, *args, **kwargs):
21         try:
22             Document.objects.get(module=self.module)
23             raise ValidationError(_('Document for that module already exists'))
24         except ObjectDoesNotExist:
25             super().clean(*args, **kwargs)
26 
27     @cached_property
28     def paragraphs_sorted(self):
29         return self.paragraph_set.all().order_by('weight')
30 
31 
32 class Paragraph(base_models.TimeStampedModel):
33     name = models.CharField(max_length=120, blank=True)
34     text = RichTextField(config_name='document-editor')
35     weight = models.PositiveIntegerField()
36     document = models.ForeignKey(Document, on_delete=models.CASCADE)
37 
38     def __str__(self):
39         return "{}_paragraph_{}".format(str(self.document), self.weight)
40 
41     def save(self, *args, **kwargs):
42         self.text = html_transforms.clean_html_field(
43             self.text)
44         super().save(*args, **kwargs)
45 
46     @cached_property
47     def comments(self):
48         contenttype = ContentType.objects.get_for_model(self)
49         pk = self.id
50         comments = comment_models.Comment.objects.all().filter(
51             content_type=contenttype, object_pk=pk)
52         return comments
53
```

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     'search',
31 
32     'wagtail.wagtailforms',
33     'wagtail.wagtailredirects',
34     'wagtail.wagtailembeds',
35     'wagtail.wagtailsites',
36     'wagtail.wagtailusers',
37     'wagtail.wagtailsnippets',
38     'wagtail.wagtaildocs',
39     'wagtail.wagtailimages',
40     'wagtail.wagtailsearch',
41     'wagtail.wagtailadmin',
42     'wagtail.wagtailcore',
43     'wagtail.contrib.wagtailstyleguide',
44 
45     'modelcluster',
46     'compressor',
47     'taggit',
48     'projects',
49     'widget_tweaks',
50     'webpack_loader',
51     'easy_thumbnails',
52     'parler',
53     'ckeditor',
54 
55     'django.contrib.sites',
56     'django.contrib.admin',
57     'django.contrib.auth',
58     'django.contrib.contenttypes',
59     'django.contrib.sessions',
60     'django.contrib.messages',
61     'django.contrib.staticfiles',
62     'django_countries',
63     'rest_framework',
64     'autofixture',
65     'rules.apps.AutodiscoverRulesConfig',
66 
67     'euth.users.apps.UsersConfig',
68     'euth.organisations.apps.OrganisationsConfig',
69     'euth.projects.apps.ProjectsConfig',
70     'euth.comments.apps.CommentConfig',
71     'euth.phases.apps.PhasesConfig',
72     'euth.modules.apps.ModuleConfig',
73     'euth.ideas.apps.IdeaConfig',
74     'euth.ratings.apps.RatingsConfig',
75     'euth.reports.apps.ReportConfig',
76     'euth.dashboard.apps.DashboardConfig',
77     'euth.memberships.apps.MembershipsConfig',
78     'euth.documents.apps.DocumentConfig'
79 ]
80 
81 MIDDLEWARE_CLASSES = [
82     'django.contrib.sessions.middleware.SessionMiddleware',
83     'django.middleware.common.CommonMiddleware',
84     'django.middleware.csrf.CsrfViewMiddleware',
85     'django.contrib.auth.middleware.AuthenticationMiddleware',
86     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
87     'django.contrib.messages.middleware.MessageMiddleware',
88     'django.middleware.clickjacking.XFrameOptionsMiddleware',
89     'django.middleware.security.SecurityMiddleware',
90     'django.middleware.locale.LocaleMiddleware',
91     'wagtail.wagtailcore.middleware.SiteMiddleware',
92     'wagtail.wagtailredirects.middleware.RedirectMiddleware',
93 ]
94 
95 SITE_ID = 1
96 
97 ROOT_URLCONF = 'euth_wagtail.urls'
98 
99 LOCALE_PATHS = [os.path.join(BASE_DIR, 'locale')]
100 
101 TEMPLATES = [
102     {
103         'BACKEND': 'django.template.backends.django.DjangoTemplates',
104         'DIRS': [
105             os.path.join(PROJECT_DIR, 'templates'),
106         ],
107         'APP_DIRS': True,
108         'OPTIONS': {
109             'context_processors': [
110                 'django.template.context_processors.debug',
111                 'django.template.context_processors.request',
112                 'django.contrib.auth.context_processors.auth',
113                 'django.contrib.messages.context_processors.messages',
114             ],
115         },
116     },
117 ]
118 
119 WSGI_APPLICATION = 'euth_wagtail.wsgi.application'
120 
121 
122 # Database
123 # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
124 
125 DATABASES = {
126     'default': {
127         'ENGINE': 'django.db.backends.sqlite3',
128         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
129     }
130 }
131 
132 
133 # Auth
134 # https://docs.djangoproject.com/en/1.8/topics/auth/customizing/
135 
136 AUTH_USER_MODEL = 'euth_users.User'
137 
138 AUTHENTICATION_BACKENDS = (
139     'rules.permissions.ObjectPermissionBackend',
140     'django.contrib.auth.backends.ModelBackend',
141 )
142 
143 CKEDITOR_CONFIGS = {
144     'default': {
145         'width': '100%',
146         'toolbar': 'Custom',
147         'toolbar_Custom': [
148             ['Bold', 'Italic', 'Underline'],
149             ['NumberedList', 'BulletedList'],
150             ['Link', 'Unlink']
151         ]
152     },
153     'document-editor': {
154         'width': '100%',
155         'toolbar': 'Custom',
156         'toolbar_Custom': [
157             ['Bold', 'Italic', 'Underline'],
158             ['NumberedList', 'BulletedList'],
159             ['Link', 'Unlink']
160         ],
161         'enterMode': 2
162     }
163 }
164 
165 BLEACH_LIST = {
166     'default' : {
167         'tags': ['p','strong','em','u','ol','li','ul','a','br'],
168         'attributes': {
169             'a': ['href', 'rel']
170         }
171     }
172 }
173 
174 # Internationalization
175 # https://docs.djangoproject.com/en/1.9/topics/i18n/
176 
177 LANGUAGE_CODE = 'en'
178 
179 TIME_ZONE = 'UTC'
180 
181 USE_I18N = True
182 
183 USE_L10N = True
184 
185 USE_TZ = True
186 
187 LANGUAGES = [
188     ('de', _('German')),
189     ('en', _('English')),
190     ('it', _('Italien')),
191     ('fr', _('French')),
192     ('sv', _('Swedish')),
193     ('sl', _('Slovene')),
194     ('da', _('Danish')),
195 ]
196 
197 PARLER_LANGUAGES = {
198     1:[{'code': language_code } for language_code, language in LANGUAGES]
199 }
200 
201 # fixtures
202 
203 FIXTURE_DIRS = [ os.path.join(PROJECT_DIR, 'fixtures') ]
204 
205 ALLOWED_UPLOAD_IMAGES = ('image/png', 'image/jpeg', 'image/gif')
206 
207 THUMBNAIL_ALIASES = {
208     '': {
209         'organisation_thumbnail': {'size': (400, 400), 'crop': 'smart'},
210         'heroimage': {'size': (1500, 500), 'crop': 'smart'},
211         'project_thumbnail': {'size': (520, 330), 'crop': 'smart'},
212         'organisation_thumbnail': {'size': (740, 540), 'crop': 'smart'},
213         'avatar_small': {'size': (60, 60), 'crop': 'smart'},
214         'avatar_medium': {'size': (300, 300), 'crop': 'smart'},
215     }
216 }
217 # Static files (CSS, JavaScript, Images)
218 # https://docs.djangoproject.com/en/1.9/howto/static-files/
219 
220 STATICFILES_FINDERS = [
221     'django.contrib.staticfiles.finders.FileSystemFinder',
222     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
223     'compressor.finders.CompressorFinder',
224 ]
225 
226 
227 WEBPACK_LOADER = {
228     'DEFAULT': {
229         'CACHE': False,
230         'BUNDLE_DIR_NAME': 'bundles/', # must end with slash
231         'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),
232         'POLL_INTERVAL': 0.1,
233         'IGNORE': ['.+\.hot-update.js', '.+\.map']
234     }
235 }
236 
237 
238 STATICFILES_DIRS = [
239     os.path.join(BASE_DIR, 'node_modules/jquery/dist'),
240     os.path.join(BASE_DIR, 'node_modules/salvattore/dist'),
241     os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/javascripts'),
242     os.path.join(BASE_DIR, 'node_modules/bootstrap-sass/assets/stylesheets'),
243     os.path.join(BASE_DIR, 'node_modules/font-awesome'),
244     os.path.join(BASE_DIR, 'node_modules/owl.carousel/dist'),
245     os.path.join(PROJECT_DIR, 'static'),
246 ]
247 
248 STATIC_ROOT = os.path.join(BASE_DIR, 'static')
249 STATIC_URL = '/static/'
250 
251 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
252 MEDIA_URL = '/media/'
253 
254 COMPRESS_PRECOMPILERS = (
255     ('text/x-scss', 'django_libsass.SassCompiler'),
256 )
257 LIBSASS_SOURCEMAPS = True
258 
259 # Wagtail settings
260 
261 WAGTAIL_SITE_NAME = "euth_wagtail"
262 
263 # Authentification
264 
265 LOGIN_URL = 'login'
266
```
--- 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/documents/models.py b/euth/documents/models.py
--- a/euth/documents/models.py
+++ b/euth/documents/models.py
@@ -31,7 +31,7 @@
 
 class Paragraph(base_models.TimeStampedModel):
     name = models.CharField(max_length=120, blank=True)
-    text = RichTextField(config_name='document-editor')
+    text = RichTextField()
     weight = models.PositiveIntegerField()
     document = models.ForeignKey(Document, on_delete=models.CASCADE)
 
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
@@ -157,14 +157,13 @@
             ['Bold', 'Italic', 'Underline'],
             ['NumberedList', 'BulletedList'],
             ['Link', 'Unlink']
-        ],
-        'enterMode': 2
+        ]
     }
 }
 
 BLEACH_LIST = {
     'default' : {
-        'tags': ['p','strong','em','u','ol','li','ul','a','br'],
+        'tags': ['p','strong','em','u','ol','li','ul','a'],
         'attributes': {
             'a': ['href', 'rel']
         }

{"golden_diff": "diff --git a/euth/documents/models.py b/euth/documents/models.py\n--- a/euth/documents/models.py\n+++ b/euth/documents/models.py\n@@ -31,7 +31,7 @@\n \n class Paragraph(base_models.TimeStampedModel):\n     name = models.CharField(max_length=120, blank=True)\n-    text = RichTextField(config_name='document-editor')\n+    text = RichTextField()\n     weight = models.PositiveIntegerField()\n     document = models.ForeignKey(Document, on_delete=models.CASCADE)\n \ndiff --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@@ -157,14 +157,13 @@\n             ['Bold', 'Italic', 'Underline'],\n             ['NumberedList', 'BulletedList'],\n             ['Link', 'Unlink']\n-        ],\n-        'enterMode': 2\n+        ]\n     }\n }\n \n BLEACH_LIST = {\n     'default' : {\n-        'tags': ['p','strong','em','u','ol','li','ul','a','br'],\n+        'tags': ['p','strong','em','u','ol','li','ul','a'],\n         'attributes': {\n             'a': ['href', 'rel']\n         }\n", "issue": "Styling in commenting text\nCurrently an the `<li>`s in an `<ul>` do not glow/highlight as expected when hovered. An the comment symbol is not part of the link / can't be clicked.\n\n", "before_files": [{"content": "from ckeditor.fields import RichTextField\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom contrib.transforms import html_transforms\nfrom euth.comments import models as comment_models\nfrom euth.contrib import base_models\nfrom euth.modules import models as module_models\n\n\nclass Document(module_models.Item):\n    name = models.CharField(max_length=120)\n\n    def __str__(self):\n        return \"{}_document_{}\".format(str(self.module), self.pk)\n\n    def clean(self, *args, **kwargs):\n        try:\n            Document.objects.get(module=self.module)\n            raise ValidationError(_('Document for that module already exists'))\n        except ObjectDoesNotExist:\n            super().clean(*args, **kwargs)\n\n    @cached_property\n    def paragraphs_sorted(self):\n        return self.paragraph_set.all().order_by('weight')\n\n\nclass Paragraph(base_models.TimeStampedModel):\n    name = models.CharField(max_length=120, blank=True)\n    text = RichTextField(config_name='document-editor')\n    weight = models.PositiveIntegerField()\n    document = models.ForeignKey(Document, on_delete=models.CASCADE)\n\n    def __str__(self):\n        return \"{}_paragraph_{}\".format(str(self.document), self.weight)\n\n    def save(self, *args, **kwargs):\n        self.text = html_transforms.clean_html_field(\n            self.text)\n        super().save(*args, **kwargs)\n\n    @cached_property\n    def comments(self):\n        contenttype = ContentType.objects.get_for_model(self)\n        pk = self.id\n        comments = comment_models.Comment.objects.all().filter(\n            content_type=contenttype, object_pk=pk)\n        return comments\n", "path": "euth/documents/models.py"}, {"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    'search',\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    'projects',\n    'widget_tweaks',\n    'webpack_loader',\n    'easy_thumbnails',\n    'parler',\n    'ckeditor',\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\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]\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    }\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)\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    'document-editor': {\n        'width': '100%',\n        'toolbar': 'Custom',\n        'toolbar_Custom': [\n            ['Bold', 'Italic', 'Underline'],\n            ['NumberedList', 'BulletedList'],\n            ['Link', 'Unlink']\n        ],\n        'enterMode': 2\n    }\n}\n\nBLEACH_LIST = {\n    'default' : {\n        'tags': ['p','strong','em','u','ol','li','ul','a','br'],\n        'attributes': {\n            'a': ['href', 'rel']\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    ('de', _('German')),\n    ('en', _('English')),\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        'organisation_thumbnail': {'size': (400, 400), 'crop': 'smart'},\n        'heroimage': {'size': (1500, 500), 'crop': 'smart'},\n        'project_thumbnail': {'size': (520, 330), 'crop': 'smart'},\n        'organisation_thumbnail': {'size': (740, 540), 'crop': 'smart'},\n        'avatar_small': {'size': (60, 60), 'crop': 'smart'},\n        'avatar_medium': {'size': (300, 300), 'crop': 'smart'},\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(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\n# Wagtail settings\n\nWAGTAIL_SITE_NAME = \"euth_wagtail\"\n\n# Authentification\n\nLOGIN_URL = 'login'\n", "path": "euth_wagtail/settings/base.py"}], "after_files": [{"content": "from ckeditor.fields import RichTextField\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom contrib.transforms import html_transforms\nfrom euth.comments import models as comment_models\nfrom euth.contrib import base_models\nfrom euth.modules import models as module_models\n\n\nclass Document(module_models.Item):\n    name = models.CharField(max_length=120)\n\n    def __str__(self):\n        return \"{}_document_{}\".format(str(self.module), self.pk)\n\n    def clean(self, *args, **kwargs):\n        try:\n            Document.objects.get(module=self.module)\n            raise ValidationError(_('Document for that module already exists'))\n        except ObjectDoesNotExist:\n            super().clean(*args, **kwargs)\n\n    @cached_property\n    def paragraphs_sorted(self):\n        return self.paragraph_set.all().order_by('weight')\n\n\nclass Paragraph(base_models.TimeStampedModel):\n    name = models.CharField(max_length=120, blank=True)\n    text = RichTextField()\n    weight = models.PositiveIntegerField()\n    document = models.ForeignKey(Document, on_delete=models.CASCADE)\n\n    def __str__(self):\n        return \"{}_paragraph_{}\".format(str(self.document), self.weight)\n\n    def save(self, *args, **kwargs):\n        self.text = html_transforms.clean_html_field(\n            self.text)\n        super().save(*args, **kwargs)\n\n    @cached_property\n    def comments(self):\n        contenttype = ContentType.objects.get_for_model(self)\n        pk = self.id\n        comments = comment_models.Comment.objects.all().filter(\n            content_type=contenttype, object_pk=pk)\n        return comments\n", "path": "euth/documents/models.py"}, {"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    'search',\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    'projects',\n    'widget_tweaks',\n    'webpack_loader',\n    'easy_thumbnails',\n    'parler',\n    'ckeditor',\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\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]\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    }\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)\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    'document-editor': {\n        'width': '100%',\n        'toolbar': 'Custom',\n        'toolbar_Custom': [\n            ['Bold', 'Italic', 'Underline'],\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}\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    ('de', _('German')),\n    ('en', _('English')),\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        'organisation_thumbnail': {'size': (400, 400), 'crop': 'smart'},\n        'heroimage': {'size': (1500, 500), 'crop': 'smart'},\n        'project_thumbnail': {'size': (520, 330), 'crop': 'smart'},\n        'organisation_thumbnail': {'size': (740, 540), 'crop': 'smart'},\n        'avatar_small': {'size': (60, 60), 'crop': 'smart'},\n        'avatar_medium': {'size': (300, 300), 'crop': 'smart'},\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(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\n# Wagtail settings\n\nWAGTAIL_SITE_NAME = \"euth_wagtail\"\n\n# Authentification\n\nLOGIN_URL = 'login'\n", "path": "euth_wagtail/settings/base.py"}]}