We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Disqus functionality is currently broken
There should be disqus inline chat widgets on each version page and each entry page. Currently these are not working - can we work to fix it.


--- 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/settings/project.py`
Content:
```
1 # coding=utf-8
2 
3 """Project level settings.
4 
5 Adjust these values as needed but don't commit passwords etc. to any public
6 repository!
7 """
8 
9 import os  # noqa
10 from django.utils.translation import ugettext_lazy as _
11 from .utils import absolute_path
12 from .contrib import *  # noqa
13 
14 # Project apps
15 INSTALLED_APPS += (
16     'base',
17     'changes',
18     'github_issue',
19     'vota',
20     'disqus',
21 )
22 
23 # Due to profile page does not available, this will redirect to home page after login
24 LOGIN_REDIRECT_URL = '/'
25 
26 # How many versions to list in each project box
27 PROJECT_VERSION_LIST_SIZE = 10
28 
29 # Set debug to false for production
30 DEBUG = TEMPLATE_DEBUG = False
31 
32 SOUTH_TESTS_MIGRATE = False
33 
34 
35 # Set languages which want to be translated
36 LANGUAGES = (
37     ('en', _('English')),
38     ('af', _('Afrikaans')),
39     ('id', _('Indonesian')),
40     ('ko', _('Korean')),
41 )
42 
43 # Set storage path for the translation files
44 LOCALE_PATHS = (absolute_path('locale'),)
45 
46 
47 MIDDLEWARE_CLASSES = (
48     # For nav bar generation
49     'core.custom_middleware.NavContextMiddleware',
50 ) + MIDDLEWARE_CLASSES
51 
52 # Project specific javascript files to be pipelined
53 # For third party libs like jquery should go in contrib.py
54 PIPELINE_JS['project'] = {
55     'source_filenames': (
56         'js/csrf-ajax.js',
57         'js/changelog.js',
58         'js/github-issue.js'
59     ),
60     'output_filename': 'js/project.js',
61 }
62 
63 # Project specific css files to be pipelined
64 # For third party libs like bootstrap should go in contrib.py
65 PIPELINE_CSS['project'] = {
66     'source_filenames': (
67         'css/changelog.css',
68     ),
69     'output_filename': 'css/project.css',
70     'extra_context': {
71         'media': 'screen, projection',
72     },
73 }
74
```

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 - grapelli needs to be added before others
8 INSTALLED_APPS = (
9     'grappelli',
10 ) + INSTALLED_APPS
11 
12 INSTALLED_APPS += (
13     'raven.contrib.django.raven_compat',  # enable Raven plugin
14     'crispy_forms',
15     'widget_tweaks',  # lets us add some bootstrap css to form elements
16     'easy_thumbnails',
17     'reversion',
18     'rosetta',
19     'embed_video',
20     'django_hashedfilenamestorage',
21     'django_countries',  # for sponsor addresses
22     # 'user_map',
23 )
24 
25 
26 MIGRATION_MODULES = {'accounts': 'core.migration'}
27 
28 GRAPPELLI_ADMIN_TITLE = 'Site administration panel'
29 
30 STOP_WORDS = (
31     'a', 'an', 'and', 'if', 'is', 'the', 'in', 'i', 'you', 'other',
32     'this', 'that'
33 )
34 
35 CRISPY_TEMPLATE_PACK = 'bootstrap3'
36 
37 # Easy-thumbnails options
38 THUMBNAIL_SUBDIR = 'thumbnails'
39 THUMBNAIL_ALIASES = {
40     '': {
41         'entry': {'size': (50, 50), 'crop': True},
42         'medium-entry': {'size': (100, 100), 'crop': True},
43         'large-entry': {'size': (400, 300), 'crop': True},
44         'thumb300x200': {'size': (300, 200), 'crop': True},
45     },
46 }
47 
48 # Pipeline related settings
49 
50 INSTALLED_APPS += (
51     'pipeline',)
52 
53 MIDDLEWARE_CLASSES += (
54     # For rosetta localisation
55     'django.middleware.locale.LocaleMiddleware',
56 )
57 
58 DEFAULT_FILE_STORAGE = (
59     'django_hashedfilenamestorage.storage.HashedFilenameFileSystemStorage')
60 
61 # use underscore template function
62 PIPELINE_TEMPLATE_FUNC = '_.template'
63 
64 # enable cached storage - requires uglify.js (node.js)
65 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
66 
67 # Contributed / third party js libs for pipeline compression
68 # For hand rolled js for this app, use project.py
69 PIPELINE_JS = {}
70 
71 # Contributed / third party css for pipeline compression
72 # For hand rolled css for this app, use project.py
73 PIPELINE_CSS = {}
74 
75 # These get enabled in prod.py
76 PIPELINE_ENABLED = False
77 PIPELINE_CSS_COMPRESSOR = None
78 PIPELINE_JS_COMPRESSOR = None
79
```
--- 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/contrib.py b/django_project/core/settings/contrib.py
--- a/django_project/core/settings/contrib.py
+++ b/django_project/core/settings/contrib.py
@@ -20,8 +20,12 @@
     'django_hashedfilenamestorage',
     'django_countries',  # for sponsor addresses
     # 'user_map',
+    'disqus',
 )
 
+# Set disqus and shortname
+# noinspection PyUnresolvedReferences
+from .secret import DISQUS_WEBSITE_SHORTNAME  # noqa
 
 MIGRATION_MODULES = {'accounts': 'core.migration'}
 
diff --git a/django_project/core/settings/project.py b/django_project/core/settings/project.py
--- a/django_project/core/settings/project.py
+++ b/django_project/core/settings/project.py
@@ -17,7 +17,6 @@
     'changes',
     'github_issue',
     'vota',
-    'disqus',
 )
 
 # Due to profile page does not available, this will redirect to home page after login

{"golden_diff": "diff --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@@ -20,8 +20,12 @@\n     'django_hashedfilenamestorage',\n     'django_countries',  # for sponsor addresses\n     # 'user_map',\n+    'disqus',\n )\n \n+# Set disqus and shortname\n+# noinspection PyUnresolvedReferences\n+from .secret import DISQUS_WEBSITE_SHORTNAME  # noqa\n \n MIGRATION_MODULES = {'accounts': 'core.migration'}\n \ndiff --git a/django_project/core/settings/project.py b/django_project/core/settings/project.py\n--- a/django_project/core/settings/project.py\n+++ b/django_project/core/settings/project.py\n@@ -17,7 +17,6 @@\n     'changes',\n     'github_issue',\n     'vota',\n-    'disqus',\n )\n \n # Due to profile page does not available, this will redirect to home page after login\n", "issue": "Disqus functionality is currently broken\nThere should be disqus inline chat widgets on each version page and each entry page. Currently these are not working - can we work to fix it.\n\n", "before_files": [{"content": "# coding=utf-8\n\n\"\"\"Project level settings.\n\nAdjust these values as needed but don't commit passwords etc. to any public\nrepository!\n\"\"\"\n\nimport os  # noqa\nfrom django.utils.translation import ugettext_lazy as _\nfrom .utils import absolute_path\nfrom .contrib import *  # noqa\n\n# Project apps\nINSTALLED_APPS += (\n    'base',\n    'changes',\n    'github_issue',\n    'vota',\n    'disqus',\n)\n\n# Due to profile page does not available, this will redirect to home page after login\nLOGIN_REDIRECT_URL = '/'\n\n# How many versions to list in each project box\nPROJECT_VERSION_LIST_SIZE = 10\n\n# Set debug to false for production\nDEBUG = TEMPLATE_DEBUG = False\n\nSOUTH_TESTS_MIGRATE = False\n\n\n# Set languages which want to be translated\nLANGUAGES = (\n    ('en', _('English')),\n    ('af', _('Afrikaans')),\n    ('id', _('Indonesian')),\n    ('ko', _('Korean')),\n)\n\n# Set storage path for the translation files\nLOCALE_PATHS = (absolute_path('locale'),)\n\n\nMIDDLEWARE_CLASSES = (\n    # For nav bar generation\n    'core.custom_middleware.NavContextMiddleware',\n) + MIDDLEWARE_CLASSES\n\n# Project specific javascript files to be pipelined\n# For third party libs like jquery should go in contrib.py\nPIPELINE_JS['project'] = {\n    'source_filenames': (\n        'js/csrf-ajax.js',\n        'js/changelog.js',\n        'js/github-issue.js'\n    ),\n    'output_filename': 'js/project.js',\n}\n\n# Project specific css files to be pipelined\n# For third party libs like bootstrap should go in contrib.py\nPIPELINE_CSS['project'] = {\n    'source_filenames': (\n        'css/changelog.css',\n    ),\n    'output_filename': 'css/project.css',\n    'extra_context': {\n        'media': 'screen, projection',\n    },\n}\n", "path": "django_project/core/settings/project.py"}, {"content": "# coding=utf-8\n\"\"\"\ncore.settings.contrib\n\"\"\"\nfrom .base import *  # noqa\n\n# Extra installed apps - grapelli needs to be added before others\nINSTALLED_APPS = (\n    'grappelli',\n) + INSTALLED_APPS\n\nINSTALLED_APPS += (\n    'raven.contrib.django.raven_compat',  # enable Raven plugin\n    'crispy_forms',\n    'widget_tweaks',  # lets us add some bootstrap css to form elements\n    'easy_thumbnails',\n    'reversion',\n    'rosetta',\n    'embed_video',\n    'django_hashedfilenamestorage',\n    'django_countries',  # for sponsor addresses\n    # 'user_map',\n)\n\n\nMIGRATION_MODULES = {'accounts': 'core.migration'}\n\nGRAPPELLI_ADMIN_TITLE = 'Site administration panel'\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# 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\nINSTALLED_APPS += (\n    'pipeline',)\n\nMIDDLEWARE_CLASSES += (\n    # For rosetta localisation\n    'django.middleware.locale.LocaleMiddleware',\n)\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\n# Contributed / third party js libs for pipeline compression\n# For hand rolled js for this app, use project.py\nPIPELINE_JS = {}\n\n# Contributed / third party css for pipeline compression\n# For hand rolled css for this app, use project.py\nPIPELINE_CSS = {}\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\n\"\"\"Project level settings.\n\nAdjust these values as needed but don't commit passwords etc. to any public\nrepository!\n\"\"\"\n\nimport os  # noqa\nfrom django.utils.translation import ugettext_lazy as _\nfrom .utils import absolute_path\nfrom .contrib import *  # noqa\n\n# Project apps\nINSTALLED_APPS += (\n    'base',\n    'changes',\n    'github_issue',\n    'vota',\n)\n\n# Due to profile page does not available, this will redirect to home page after login\nLOGIN_REDIRECT_URL = '/'\n\n# How many versions to list in each project box\nPROJECT_VERSION_LIST_SIZE = 10\n\n# Set debug to false for production\nDEBUG = TEMPLATE_DEBUG = False\n\nSOUTH_TESTS_MIGRATE = False\n\n\n# Set languages which want to be translated\nLANGUAGES = (\n    ('en', _('English')),\n    ('af', _('Afrikaans')),\n    ('id', _('Indonesian')),\n    ('ko', _('Korean')),\n)\n\n# Set storage path for the translation files\nLOCALE_PATHS = (absolute_path('locale'),)\n\n\nMIDDLEWARE_CLASSES = (\n    # For nav bar generation\n    'core.custom_middleware.NavContextMiddleware',\n) + MIDDLEWARE_CLASSES\n\n# Project specific javascript files to be pipelined\n# For third party libs like jquery should go in contrib.py\nPIPELINE_JS['project'] = {\n    'source_filenames': (\n        'js/csrf-ajax.js',\n        'js/changelog.js',\n        'js/github-issue.js'\n    ),\n    'output_filename': 'js/project.js',\n}\n\n# Project specific css files to be pipelined\n# For third party libs like bootstrap should go in contrib.py\nPIPELINE_CSS['project'] = {\n    'source_filenames': (\n        'css/changelog.css',\n    ),\n    'output_filename': 'css/project.css',\n    'extra_context': {\n        'media': 'screen, projection',\n    },\n}\n", "path": "django_project/core/settings/project.py"}, {"content": "# coding=utf-8\n\"\"\"\ncore.settings.contrib\n\"\"\"\nfrom .base import *  # noqa\n\n# Extra installed apps - grapelli needs to be added before others\nINSTALLED_APPS = (\n    'grappelli',\n) + INSTALLED_APPS\n\nINSTALLED_APPS += (\n    'raven.contrib.django.raven_compat',  # enable Raven plugin\n    'crispy_forms',\n    'widget_tweaks',  # lets us add some bootstrap css to form elements\n    'easy_thumbnails',\n    'reversion',\n    'rosetta',\n    'embed_video',\n    'django_hashedfilenamestorage',\n    'django_countries',  # for sponsor addresses\n    # 'user_map',\n    'disqus',\n)\n\n# Set disqus and shortname\n# noinspection PyUnresolvedReferences\nfrom .secret import DISQUS_WEBSITE_SHORTNAME  # noqa\n\nMIGRATION_MODULES = {'accounts': 'core.migration'}\n\nGRAPPELLI_ADMIN_TITLE = 'Site administration panel'\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# 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\nINSTALLED_APPS += (\n    'pipeline',)\n\nMIDDLEWARE_CLASSES += (\n    # For rosetta localisation\n    'django.middleware.locale.LocaleMiddleware',\n)\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\n# Contributed / third party js libs for pipeline compression\n# For hand rolled js for this app, use project.py\nPIPELINE_JS = {}\n\n# Contributed / third party css for pipeline compression\n# For hand rolled css for this app, use project.py\nPIPELINE_CSS = {}\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"}]}