We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Permalink to a feature is not working.
The permalink to a feature does not work. For instance `http://changelog.linfiniti.com/qgis/version/2.10/#275` does not scroll to the anchor.

Moreover,if we click on the anchor, the webbrowser doesn't keep the link.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `django_project/core/urls.py`
Content:
```
1 # coding=utf-8
2 """Project level url handler."""
3 from django.conf.urls import patterns, include, url
4 from django.conf.urls.i18n import i18n_patterns
5 from django.contrib.auth import views as auth_views
6 from django.contrib import admin
7 from django.conf import settings
8 from django.conf.urls.static import static
9 admin.autodiscover()
10 
11 handler404 = 'base.views.error_views.custom_404'
12 
13 urlpatterns = [
14     # '',
15     # # Enable the admin (use non standard name for obscurity)
16     # url(r'^site-admin/', include(admin.site.urls)),
17     # url(r'^', include('base.urls')),
18     # url(r'^', include('changes.urls')),
19     # url(r'^', include('vota.urls')),
20     # url(r'^', include('github_issue.urls')),
21     #
22     # # This over-ride is required to fix 500 errors as per:
23     # # https://github.com/bread-and-pepper/django-userena/issues/380
24     # url(r'^password/reset/done/$',
25     #     auth_views.password_reset_done,
26     #     {'template_name': 'userena/password_reset_done.html'},
27     #     name='password_reset_done'),
28     # url(r'^accounts/', include('userena.urls')),
29 ]
30 
31 urlpatterns += i18n_patterns(
32     url(r'^site-admin/', include(admin.site.urls)),
33     url(r'^', include('base.urls')),
34     url(r'^', include('changes.urls')),
35     url(r'^', include('vota.urls')),
36     url(r'^', include('github_issue.urls')),
37     url(r'^password/reset/done/$',
38         auth_views.password_reset_done,
39         {'template_name': 'userena/password_reset_done.html'},
40         name='password_reset_done'),
41     url(r'^accounts/', include('userena.urls')),
42 )
43 
44 if 'rosetta' in settings.INSTALLED_APPS:
45     urlpatterns += patterns(
46         '',
47         url(r'^rosetta/', include('rosetta.urls')),
48     )
49 
50 if settings.DEBUG:
51     urlpatterns += static(
52         settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
53
```

Path: `django_project/core/settings/base.py`
Content:
```
1 # coding=utf-8
2 """
3 core.settings.base
4 """
5 # Django settings for projecta project.
6 
7 from .utils import absolute_path
8 
9 ADMINS = (
10     ('Tim Sutton', 'tim@kartoza.com'),
11     ('Rischan Mafrur', 'rischan@kartoza.com')
12 )
13 SERVER_EMAIL = 'tim@linfiniti.com'
14 EMAIL_HOST = 'localhost'
15 DEFAULT_FROM_EMAIL = 'tim@linfiniti.com'
16 
17 MANAGERS = ADMINS
18 
19 # Local time zone for this installation. Choices can be found here:
20 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
21 # although not all choices may be available on all operating systems.
22 # In a Windows environment this must be set to your system time zone.
23 TIME_ZONE = 'Africa/Johannesburg'
24 
25 # Language code for this installation. All choices can be found here:
26 # http://www.i18nguy.com/unicode/language-identifiers.html
27 LANGUAGE_CODE = 'en-us'
28 
29 SITE_ID = 1
30 
31 # If you set this to False, Django will make some optimizations so as not
32 # to load the internationalization machinery.
33 USE_I18N = True
34 
35 # If you set this to False, Django will not format dates, numbers and
36 # calendars according to the current locale.
37 USE_L10N = True
38 
39 # If you set this to False, Django will not use timezone-aware datetimes.
40 USE_TZ = True
41 
42 # Absolute filesystem path to the directory that will hold user-uploaded files.
43 # Example: "/var/www/example.com/media/"
44 MEDIA_ROOT = '/home/web/media'
45 
46 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
47 # trailing slash.
48 # Examples: "http://example.com/media/", "http://media.example.com/"
49 # MEDIA_URL = '/media/'
50 # setting full MEDIA_URL to be able to use it for the feeds
51 MEDIA_URL = '/media/'
52 
53 # Absolute path to the directory static files should be collected to.
54 # Don't put anything in this directory yourself; store your static files
55 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
56 # Example: "/var/www/example.com/static/"
57 STATIC_ROOT = '/home/web/static'
58 
59 # URL prefix for static files.
60 # Example: "http://example.com/static/", "http://static.example.com/"
61 STATIC_URL = '/static/'
62 
63 # Additional locations of static files
64 STATICFILES_DIRS = (
65     # Put strings here, like "/home/html/static" or "C:/www/django/static".
66     # Always use forward slashes, even on Windows.
67     # Don't forget to use absolute paths, not relative paths.
68     absolute_path('core', 'base_static'),
69 )
70 
71 # List of finder classes that know how to find static files in
72 # various locations.
73 STATICFILES_FINDERS = (
74     'django.contrib.staticfiles.finders.FileSystemFinder',
75     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
76     # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
77 )
78 
79 # import SECRET_KEY into current namespace
80 # noinspection PyUnresolvedReferences
81 from .secret import SECRET_KEY  # noqa
82 
83 # List of callables that know how to import templates from various sources.
84 TEMPLATE_LOADERS = (
85     'django.template.loaders.filesystem.Loader',
86     'django.template.loaders.app_directories.Loader',
87     # 'django.template.loaders.eggs.Loader',
88 )
89 
90 TEMPLATE_CONTEXT_PROCESSORS = (
91     'django.contrib.auth.context_processors.auth',
92     'django.core.context_processors.request',
93     'django.core.context_processors.media',
94     'core.context_processors.add_intercom_app_id',
95     'django.template.context_processors.i18n'
96 )
97 
98 MIDDLEWARE_CLASSES = (
99     'django.middleware.common.CommonMiddleware',
100     'django.contrib.sessions.middleware.SessionMiddleware',
101     'django.middleware.csrf.CsrfViewMiddleware',
102     'django.contrib.auth.middleware.AuthenticationMiddleware',
103     'django.contrib.messages.middleware.MessageMiddleware',
104     # Uncomment the next line for simple clickjacking protection:
105     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
106     'core.custom_middleware.NavContextMiddleware',
107     'django.middleware.locale.LocaleMiddleware'
108 )
109 
110 ROOT_URLCONF = 'core.urls'
111 
112 # Python dotted path to the WSGI application used by Django's runserver.
113 WSGI_APPLICATION = 'core.wsgi.application'
114 
115 TEMPLATE_DIRS = (
116     # project level templates
117     absolute_path('core', 'base_templates'),
118     absolute_path('vota', 'templates'),
119     absolute_path('changes', 'templates'),
120 
121 )
122 
123 INSTALLED_APPS = (
124     'django.contrib.auth',
125     'django.contrib.contenttypes',
126     'django.contrib.sessions',
127     'django.contrib.sites',
128     'django.contrib.messages',
129     'django.contrib.staticfiles',
130     'django.contrib.admin',
131     'django.contrib.syndication',
132 )
133 
134 # A sample logging configuration. The only tangible logging
135 # performed by this configuration is to send an email to
136 # the site admins on every HTTP 500 error when DEBUG=False.
137 # See http://docs.djangoproject.com/en/dev/topics/logging for
138 # more details on how to customize your logging configuration.
139 LOGGING = {
140     'version': 1,
141     'disable_existing_loggers': False,
142     'filters': {
143         'require_debug_false': {
144             '()': 'django.utils.log.RequireDebugFalse'
145         }
146     },
147     'handlers': {
148         'mail_admins': {
149             'level': 'ERROR',
150             'filters': ['require_debug_false'],
151             'class': 'django.utils.log.AdminEmailHandler'
152         }
153     },
154     'loggers': {
155         'django.request': {
156             'handlers': ['mail_admins'],
157             'level': 'ERROR',
158             'propagate': True,
159         },
160     }
161 }
162
```

Path: `django_project/core/settings/contrib.py`
Content:
```
1 # coding=utf-8
2 """
3 core.settings.contrib
4 """
5 from .base import *  # noqa
6 
7 # Extra installed apps
8 INSTALLED_APPS += (
9     # 'raven.contrib.django',  # enable Raven plugin
10     'crispy_forms',
11     'widget_tweaks',  # lets us add some bootstrap css to form elements
12     'accounts',  # userena
13     'guardian',  # for userena
14     'easy_thumbnails',  # also needed for userena
15     'userena',
16     'raven.contrib.django',
17     'reversion',
18     'rosetta',
19     'embed_video',
20     # 'user_map',
21 )
22 
23 STOP_WORDS = (
24     'a', 'an', 'and', 'if', 'is', 'the', 'in', 'i', 'you', 'other',
25     'this', 'that'
26 )
27 
28 CRISPY_TEMPLATE_PACK = 'bootstrap3'
29 
30 # Added for userena
31 AUTHENTICATION_BACKENDS = (
32     'userena.backends.UserenaAuthenticationBackend',
33     'guardian.backends.ObjectPermissionBackend',
34     'django.contrib.auth.backends.ModelBackend',
35 )
36 ANONYMOUS_USER_ID = -1
37 AUTH_PROFILE_MODULE = 'accounts.Profile'
38 LOGIN_REDIRECT_URL = '/accounts/%(username)s/'
39 LOGIN_URL = '/accounts/signin/'
40 LOGOUT_URL = '/accounts/signout/'
41 
42 # Easy-thumbnails options
43 THUMBNAIL_SUBDIR = 'thumbnails'
44 THUMBNAIL_ALIASES = {
45     '': {
46         'entry': {'size': (50, 50), 'crop': True},
47         'medium-entry': {'size': (100, 100), 'crop': True},
48         'large-entry': {'size': (400, 300), 'crop': True},
49         'thumb300x200': {'size': (300, 200), 'crop': True},
50     },
51 }
52 
53 # Pipeline related settings
54 
55 
56 INSTALLED_APPS += (
57     'pipeline',)
58 
59 DEFAULT_FILE_STORAGE = (
60     'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage')
61 
62 # use underscore template function
63 PIPELINE_TEMPLATE_FUNC = '_.template'
64 
65 # enable cached storage - requires uglify.js (node.js)
66 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
67 
68 PIPELINE_JS = {
69     'contrib': {
70         'source_filenames': (
71             'js/jquery-1.10.1.min.js',
72             'js/csrf-ajax.js',
73             'js/underscore-min.js',
74             'js/bootstrap.min.js',
75             'js/changelog.js',
76             'js/github-issue.js',
77         ),
78         'output_filename': 'js/contrib.js',
79     }
80 }
81 
82 PIPELINE_CSS = {
83     'contrib': {
84         'source_filenames': (
85             'css/bootstrap.min.css',
86             'css/bootstrap-theme.min.css',
87             'css/changelog.css',
88         ),
89         'output_filename': 'css/contrib.css',
90         'extra_context': {
91             'media': 'screen, projection',
92         },
93     }
94 }
95 
96 # These get enabled in prod.py
97 PIPELINE_ENABLED = False
98 PIPELINE_CSS_COMPRESSOR = None
99 PIPELINE_JS_COMPRESSOR = None
100
```
--- 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/django_project/core/settings/base.py b/django_project/core/settings/base.py
--- a/django_project/core/settings/base.py
+++ b/django_project/core/settings/base.py
@@ -108,6 +108,7 @@
 )
 
 ROOT_URLCONF = 'core.urls'
+GRAPPELLI_ADMIN_TITLE = ''
 
 # Python dotted path to the WSGI application used by Django's runserver.
 WSGI_APPLICATION = 'core.wsgi.application'
diff --git a/django_project/core/settings/contrib.py b/django_project/core/settings/contrib.py
--- a/django_project/core/settings/contrib.py
+++ b/django_project/core/settings/contrib.py
@@ -5,6 +5,10 @@
 from .base import *  # noqa
 
 # Extra installed apps
+INSTALLED_APPS = (
+    'grappelli',
+) + INSTALLED_APPS
+
 INSTALLED_APPS += (
     # 'raven.contrib.django',  # enable Raven plugin
     'crispy_forms',
diff --git a/django_project/core/urls.py b/django_project/core/urls.py
--- a/django_project/core/urls.py
+++ b/django_project/core/urls.py
@@ -29,6 +29,7 @@
 ]
 
 urlpatterns += i18n_patterns(
+    url(r'^grappelli/', include('grappelli.urls')),
     url(r'^site-admin/', include(admin.site.urls)),
     url(r'^', include('base.urls')),
     url(r'^', include('changes.urls')),

{"golden_diff": "diff --git a/django_project/core/settings/base.py b/django_project/core/settings/base.py\n--- a/django_project/core/settings/base.py\n+++ b/django_project/core/settings/base.py\n@@ -108,6 +108,7 @@\n )\n \n ROOT_URLCONF = 'core.urls'\n+GRAPPELLI_ADMIN_TITLE = ''\n \n # Python dotted path to the WSGI application used by Django's runserver.\n WSGI_APPLICATION = 'core.wsgi.application'\ndiff --git a/django_project/core/settings/contrib.py b/django_project/core/settings/contrib.py\n--- a/django_project/core/settings/contrib.py\n+++ b/django_project/core/settings/contrib.py\n@@ -5,6 +5,10 @@\n from .base import *  # noqa\n \n # Extra installed apps\n+INSTALLED_APPS = (\n+    'grappelli',\n+) + INSTALLED_APPS\n+\n INSTALLED_APPS += (\n     # 'raven.contrib.django',  # enable Raven plugin\n     'crispy_forms',\ndiff --git a/django_project/core/urls.py b/django_project/core/urls.py\n--- a/django_project/core/urls.py\n+++ b/django_project/core/urls.py\n@@ -29,6 +29,7 @@\n ]\n \n urlpatterns += i18n_patterns(\n+    url(r'^grappelli/', include('grappelli.urls')),\n     url(r'^site-admin/', include(admin.site.urls)),\n     url(r'^', include('base.urls')),\n     url(r'^', include('changes.urls')),\n", "issue": "Permalink to a feature is not working.\nThe permalink to a feature does not work. For instance `http://changelog.linfiniti.com/qgis/version/2.10/#275` does not scroll to the anchor.\n\nMoreover,if we click on the anchor, the webbrowser doesn't keep the link.\n\n", "before_files": [{"content": "# coding=utf-8\n\"\"\"Project level url handler.\"\"\"\nfrom django.conf.urls import patterns, include, url\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib.auth import views as auth_views\nfrom django.contrib import admin\nfrom django.conf import settings\nfrom django.conf.urls.static import static\nadmin.autodiscover()\n\nhandler404 = 'base.views.error_views.custom_404'\n\nurlpatterns = [\n    # '',\n    # # Enable the admin (use non standard name for obscurity)\n    # url(r'^site-admin/', include(admin.site.urls)),\n    # url(r'^', include('base.urls')),\n    # url(r'^', include('changes.urls')),\n    # url(r'^', include('vota.urls')),\n    # url(r'^', include('github_issue.urls')),\n    #\n    # # This over-ride is required to fix 500 errors as per:\n    # # https://github.com/bread-and-pepper/django-userena/issues/380\n    # url(r'^password/reset/done/$',\n    #     auth_views.password_reset_done,\n    #     {'template_name': 'userena/password_reset_done.html'},\n    #     name='password_reset_done'),\n    # url(r'^accounts/', include('userena.urls')),\n]\n\nurlpatterns += i18n_patterns(\n    url(r'^site-admin/', include(admin.site.urls)),\n    url(r'^', include('base.urls')),\n    url(r'^', include('changes.urls')),\n    url(r'^', include('vota.urls')),\n    url(r'^', include('github_issue.urls')),\n    url(r'^password/reset/done/$',\n        auth_views.password_reset_done,\n        {'template_name': 'userena/password_reset_done.html'},\n        name='password_reset_done'),\n    url(r'^accounts/', include('userena.urls')),\n)\n\nif 'rosetta' in settings.INSTALLED_APPS:\n    urlpatterns += patterns(\n        '',\n        url(r'^rosetta/', include('rosetta.urls')),\n    )\n\nif settings.DEBUG:\n    urlpatterns += static(\n        settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n", "path": "django_project/core/urls.py"}, {"content": "# coding=utf-8\n\"\"\"\ncore.settings.base\n\"\"\"\n# Django settings for projecta project.\n\nfrom .utils import absolute_path\n\nADMINS = (\n    ('Tim Sutton', 'tim@kartoza.com'),\n    ('Rischan Mafrur', 'rischan@kartoza.com')\n)\nSERVER_EMAIL = 'tim@linfiniti.com'\nEMAIL_HOST = 'localhost'\nDEFAULT_FROM_EMAIL = 'tim@linfiniti.com'\n\nMANAGERS = ADMINS\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# In a Windows environment this must be set to your system time zone.\nTIME_ZONE = 'Africa/Johannesburg'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\nLANGUAGE_CODE = 'en-us'\n\nSITE_ID = 1\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\nUSE_I18N = True\n\n# If you set this to False, Django will not format dates, numbers and\n# calendars according to the current locale.\nUSE_L10N = True\n\n# If you set this to False, Django will not use timezone-aware datetimes.\nUSE_TZ = True\n\n# Absolute filesystem path to the directory that will hold user-uploaded files.\n# Example: \"/var/www/example.com/media/\"\nMEDIA_ROOT = '/home/web/media'\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash.\n# Examples: \"http://example.com/media/\", \"http://media.example.com/\"\n# MEDIA_URL = '/media/'\n# setting full MEDIA_URL to be able to use it for the feeds\nMEDIA_URL = '/media/'\n\n# Absolute path to the directory static files should be collected to.\n# Don't put anything in this directory yourself; store your static files\n# in apps' \"static/\" subdirectories and in STATICFILES_DIRS.\n# Example: \"/var/www/example.com/static/\"\nSTATIC_ROOT = '/home/web/static'\n\n# URL prefix for static files.\n# Example: \"http://example.com/static/\", \"http://static.example.com/\"\nSTATIC_URL = '/static/'\n\n# Additional locations of static files\nSTATICFILES_DIRS = (\n    # Put strings here, like \"/home/html/static\" or \"C:/www/django/static\".\n    # Always use forward slashes, even on Windows.\n    # Don't forget to use absolute paths, not relative paths.\n    absolute_path('core', 'base_static'),\n)\n\n# List of finder classes that know how to find static files in\n# various locations.\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    # 'django.contrib.staticfiles.finders.DefaultStorageFinder',\n)\n\n# import SECRET_KEY into current namespace\n# noinspection PyUnresolvedReferences\nfrom .secret import SECRET_KEY  # noqa\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n    'django.template.loaders.filesystem.Loader',\n    'django.template.loaders.app_directories.Loader',\n    # 'django.template.loaders.eggs.Loader',\n)\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n    'django.contrib.auth.context_processors.auth',\n    'django.core.context_processors.request',\n    'django.core.context_processors.media',\n    'core.context_processors.add_intercom_app_id',\n    'django.template.context_processors.i18n'\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    # Uncomment the next line for simple clickjacking protection:\n    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'core.custom_middleware.NavContextMiddleware',\n    'django.middleware.locale.LocaleMiddleware'\n)\n\nROOT_URLCONF = 'core.urls'\n\n# Python dotted path to the WSGI application used by Django's runserver.\nWSGI_APPLICATION = 'core.wsgi.application'\n\nTEMPLATE_DIRS = (\n    # project level templates\n    absolute_path('core', 'base_templates'),\n    absolute_path('vota', 'templates'),\n    absolute_path('changes', 'templates'),\n\n)\n\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django.contrib.admin',\n    'django.contrib.syndication',\n)\n\n# A sample logging configuration. The only tangible logging\n# performed by this configuration is to send an email to\n# the site admins on every HTTP 500 error when DEBUG=False.\n# See http://docs.djangoproject.com/en/dev/topics/logging for\n# more details on how to customize your logging configuration.\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'filters': {\n        'require_debug_false': {\n            '()': 'django.utils.log.RequireDebugFalse'\n        }\n    },\n    'handlers': {\n        'mail_admins': {\n            'level': 'ERROR',\n            'filters': ['require_debug_false'],\n            'class': 'django.utils.log.AdminEmailHandler'\n        }\n    },\n    'loggers': {\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': True,\n        },\n    }\n}\n", "path": "django_project/core/settings/base.py"}, {"content": "# coding=utf-8\n\"\"\"\ncore.settings.contrib\n\"\"\"\nfrom .base import *  # noqa\n\n# Extra installed apps\nINSTALLED_APPS += (\n    # 'raven.contrib.django',  # enable Raven plugin\n    'crispy_forms',\n    'widget_tweaks',  # lets us add some bootstrap css to form elements\n    'accounts',  # userena\n    'guardian',  # for userena\n    'easy_thumbnails',  # also needed for userena\n    'userena',\n    'raven.contrib.django',\n    'reversion',\n    'rosetta',\n    'embed_video',\n    # 'user_map',\n)\n\nSTOP_WORDS = (\n    'a', 'an', 'and', 'if', 'is', 'the', 'in', 'i', 'you', 'other',\n    'this', 'that'\n)\n\nCRISPY_TEMPLATE_PACK = 'bootstrap3'\n\n# Added for userena\nAUTHENTICATION_BACKENDS = (\n    'userena.backends.UserenaAuthenticationBackend',\n    'guardian.backends.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend',\n)\nANONYMOUS_USER_ID = -1\nAUTH_PROFILE_MODULE = 'accounts.Profile'\nLOGIN_REDIRECT_URL = '/accounts/%(username)s/'\nLOGIN_URL = '/accounts/signin/'\nLOGOUT_URL = '/accounts/signout/'\n\n# Easy-thumbnails options\nTHUMBNAIL_SUBDIR = 'thumbnails'\nTHUMBNAIL_ALIASES = {\n    '': {\n        'entry': {'size': (50, 50), 'crop': True},\n        'medium-entry': {'size': (100, 100), 'crop': True},\n        'large-entry': {'size': (400, 300), 'crop': True},\n        'thumb300x200': {'size': (300, 200), 'crop': True},\n    },\n}\n\n# Pipeline related settings\n\n\nINSTALLED_APPS += (\n    'pipeline',)\n\nDEFAULT_FILE_STORAGE = (\n    'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage')\n\n# use underscore template function\nPIPELINE_TEMPLATE_FUNC = '_.template'\n\n# enable cached storage - requires uglify.js (node.js)\nSTATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'\n\nPIPELINE_JS = {\n    'contrib': {\n        'source_filenames': (\n            'js/jquery-1.10.1.min.js',\n            'js/csrf-ajax.js',\n            'js/underscore-min.js',\n            'js/bootstrap.min.js',\n            'js/changelog.js',\n            'js/github-issue.js',\n        ),\n        'output_filename': 'js/contrib.js',\n    }\n}\n\nPIPELINE_CSS = {\n    'contrib': {\n        'source_filenames': (\n            'css/bootstrap.min.css',\n            'css/bootstrap-theme.min.css',\n            'css/changelog.css',\n        ),\n        'output_filename': 'css/contrib.css',\n        'extra_context': {\n            'media': 'screen, projection',\n        },\n    }\n}\n\n# These get enabled in prod.py\nPIPELINE_ENABLED = False\nPIPELINE_CSS_COMPRESSOR = None\nPIPELINE_JS_COMPRESSOR = None\n", "path": "django_project/core/settings/contrib.py"}], "after_files": [{"content": "# coding=utf-8\n\"\"\"Project level url handler.\"\"\"\nfrom django.conf.urls import patterns, include, url\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib.auth import views as auth_views\nfrom django.contrib import admin\nfrom django.conf import settings\nfrom django.conf.urls.static import static\nadmin.autodiscover()\n\nhandler404 = 'base.views.error_views.custom_404'\n\nurlpatterns = [\n    # '',\n    # # Enable the admin (use non standard name for obscurity)\n    # url(r'^site-admin/', include(admin.site.urls)),\n    # url(r'^', include('base.urls')),\n    # url(r'^', include('changes.urls')),\n    # url(r'^', include('vota.urls')),\n    # url(r'^', include('github_issue.urls')),\n    #\n    # # This over-ride is required to fix 500 errors as per:\n    # # https://github.com/bread-and-pepper/django-userena/issues/380\n    # url(r'^password/reset/done/$',\n    #     auth_views.password_reset_done,\n    #     {'template_name': 'userena/password_reset_done.html'},\n    #     name='password_reset_done'),\n    # url(r'^accounts/', include('userena.urls')),\n]\n\nurlpatterns += i18n_patterns(\n    url(r'^grappelli/', include('grappelli.urls')),\n    url(r'^site-admin/', include(admin.site.urls)),\n    url(r'^', include('base.urls')),\n    url(r'^', include('changes.urls')),\n    url(r'^', include('vota.urls')),\n    url(r'^', include('github_issue.urls')),\n    url(r'^password/reset/done/$',\n        auth_views.password_reset_done,\n        {'template_name': 'userena/password_reset_done.html'},\n        name='password_reset_done'),\n    url(r'^accounts/', include('userena.urls')),\n)\n\nif 'rosetta' in settings.INSTALLED_APPS:\n    urlpatterns += patterns(\n        '',\n        url(r'^rosetta/', include('rosetta.urls')),\n    )\n\nif settings.DEBUG:\n    urlpatterns += static(\n        settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n", "path": "django_project/core/urls.py"}, {"content": "# coding=utf-8\n\"\"\"\ncore.settings.base\n\"\"\"\n# Django settings for projecta project.\n\nfrom .utils import absolute_path\n\nADMINS = (\n    ('Tim Sutton', 'tim@kartoza.com'),\n    ('Rischan Mafrur', 'rischan@kartoza.com')\n)\nSERVER_EMAIL = 'tim@linfiniti.com'\nEMAIL_HOST = 'localhost'\nDEFAULT_FROM_EMAIL = 'tim@linfiniti.com'\n\nMANAGERS = ADMINS\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# In a Windows environment this must be set to your system time zone.\nTIME_ZONE = 'Africa/Johannesburg'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\nLANGUAGE_CODE = 'en-us'\n\nSITE_ID = 1\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\nUSE_I18N = True\n\n# If you set this to False, Django will not format dates, numbers and\n# calendars according to the current locale.\nUSE_L10N = True\n\n# If you set this to False, Django will not use timezone-aware datetimes.\nUSE_TZ = True\n\n# Absolute filesystem path to the directory that will hold user-uploaded files.\n# Example: \"/var/www/example.com/media/\"\nMEDIA_ROOT = '/home/web/media'\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash.\n# Examples: \"http://example.com/media/\", \"http://media.example.com/\"\n# MEDIA_URL = '/media/'\n# setting full MEDIA_URL to be able to use it for the feeds\nMEDIA_URL = '/media/'\n\n# Absolute path to the directory static files should be collected to.\n# Don't put anything in this directory yourself; store your static files\n# in apps' \"static/\" subdirectories and in STATICFILES_DIRS.\n# Example: \"/var/www/example.com/static/\"\nSTATIC_ROOT = '/home/web/static'\n\n# URL prefix for static files.\n# Example: \"http://example.com/static/\", \"http://static.example.com/\"\nSTATIC_URL = '/static/'\n\n# Additional locations of static files\nSTATICFILES_DIRS = (\n    # Put strings here, like \"/home/html/static\" or \"C:/www/django/static\".\n    # Always use forward slashes, even on Windows.\n    # Don't forget to use absolute paths, not relative paths.\n    absolute_path('core', 'base_static'),\n)\n\n# List of finder classes that know how to find static files in\n# various locations.\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    # 'django.contrib.staticfiles.finders.DefaultStorageFinder',\n)\n\n# import SECRET_KEY into current namespace\n# noinspection PyUnresolvedReferences\nfrom .secret import SECRET_KEY  # noqa\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n    'django.template.loaders.filesystem.Loader',\n    'django.template.loaders.app_directories.Loader',\n    # 'django.template.loaders.eggs.Loader',\n)\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n    'django.contrib.auth.context_processors.auth',\n    'django.core.context_processors.request',\n    'django.core.context_processors.media',\n    'core.context_processors.add_intercom_app_id',\n    'django.template.context_processors.i18n'\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    # Uncomment the next line for simple clickjacking protection:\n    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'core.custom_middleware.NavContextMiddleware',\n    'django.middleware.locale.LocaleMiddleware'\n)\n\nROOT_URLCONF = 'core.urls'\nGRAPPELLI_ADMIN_TITLE = ''\n\n# Python dotted path to the WSGI application used by Django's runserver.\nWSGI_APPLICATION = 'core.wsgi.application'\n\nTEMPLATE_DIRS = (\n    # project level templates\n    absolute_path('core', 'base_templates'),\n    absolute_path('vota', 'templates'),\n    absolute_path('changes', 'templates'),\n\n)\n\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django.contrib.admin',\n    'django.contrib.syndication',\n)\n\n# A sample logging configuration. The only tangible logging\n# performed by this configuration is to send an email to\n# the site admins on every HTTP 500 error when DEBUG=False.\n# See http://docs.djangoproject.com/en/dev/topics/logging for\n# more details on how to customize your logging configuration.\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'filters': {\n        'require_debug_false': {\n            '()': 'django.utils.log.RequireDebugFalse'\n        }\n    },\n    'handlers': {\n        'mail_admins': {\n            'level': 'ERROR',\n            'filters': ['require_debug_false'],\n            'class': 'django.utils.log.AdminEmailHandler'\n        }\n    },\n    'loggers': {\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': True,\n        },\n    }\n}\n", "path": "django_project/core/settings/base.py"}, {"content": "# coding=utf-8\n\"\"\"\ncore.settings.contrib\n\"\"\"\nfrom .base import *  # noqa\n\n# Extra installed apps\nINSTALLED_APPS = (\n    'grappelli',\n) + INSTALLED_APPS\n\nINSTALLED_APPS += (\n    # 'raven.contrib.django',  # enable Raven plugin\n    'crispy_forms',\n    'widget_tweaks',  # lets us add some bootstrap css to form elements\n    'accounts',  # userena\n    'guardian',  # for userena\n    'easy_thumbnails',  # also needed for userena\n    'userena',\n    'raven.contrib.django',\n    'reversion',\n    'rosetta',\n    'embed_video',\n    # 'user_map',\n)\n\nSTOP_WORDS = (\n    'a', 'an', 'and', 'if', 'is', 'the', 'in', 'i', 'you', 'other',\n    'this', 'that'\n)\n\nCRISPY_TEMPLATE_PACK = 'bootstrap3'\n\n# Added for userena\nAUTHENTICATION_BACKENDS = (\n    'userena.backends.UserenaAuthenticationBackend',\n    'guardian.backends.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend',\n)\nANONYMOUS_USER_ID = -1\nAUTH_PROFILE_MODULE = 'accounts.Profile'\nLOGIN_REDIRECT_URL = '/accounts/%(username)s/'\nLOGIN_URL = '/accounts/signin/'\nLOGOUT_URL = '/accounts/signout/'\n\n# Easy-thumbnails options\nTHUMBNAIL_SUBDIR = 'thumbnails'\nTHUMBNAIL_ALIASES = {\n    '': {\n        'entry': {'size': (50, 50), 'crop': True},\n        'medium-entry': {'size': (100, 100), 'crop': True},\n        'large-entry': {'size': (400, 300), 'crop': True},\n        'thumb300x200': {'size': (300, 200), 'crop': True},\n    },\n}\n\n# Pipeline related settings\n\n\nINSTALLED_APPS += (\n    'pipeline',)\n\nDEFAULT_FILE_STORAGE = (\n    'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage')\n\n# use underscore template function\nPIPELINE_TEMPLATE_FUNC = '_.template'\n\n# enable cached storage - requires uglify.js (node.js)\nSTATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'\n\nPIPELINE_JS = {\n    'contrib': {\n        'source_filenames': (\n            'js/jquery-1.10.1.min.js',\n            'js/csrf-ajax.js',\n            'js/underscore-min.js',\n            'js/bootstrap.min.js',\n            'js/changelog.js',\n            'js/github-issue.js',\n        ),\n        'output_filename': 'js/contrib.js',\n    }\n}\n\nPIPELINE_CSS = {\n    'contrib': {\n        'source_filenames': (\n            'css/bootstrap.min.css',\n            'css/bootstrap-theme.min.css',\n            'css/changelog.css',\n        ),\n        'output_filename': 'css/contrib.css',\n        'extra_context': {\n            'media': 'screen, projection',\n        },\n    }\n}\n\n# These get enabled in prod.py\nPIPELINE_ENABLED = False\nPIPELINE_CSS_COMPRESSOR = None\nPIPELINE_JS_COMPRESSOR = None\n", "path": "django_project/core/settings/contrib.py"}]}