We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove copyright application
This was brought up in review and not handled. Doesn't look like we need it any longer?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `readthedocs/settings/base.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 # pylint: disable=missing-docstring
3 
4 from __future__ import (
5     absolute_import, division, print_function, unicode_literals)
6 
7 import os
8 
9 from readthedocs.core.settings import Settings
10 
11 try:
12     import readthedocsext  # noqa
13     ext = True
14 except ImportError:
15     ext = False
16 
17 
18 _ = gettext = lambda s: s
19 
20 
21 class CommunityBaseSettings(Settings):
22 
23     """Community base settings, don't use this directly."""
24 
25     # Django settings
26     SITE_ID = 1
27     ROOT_URLCONF = 'readthedocs.urls'
28     SUBDOMAIN_URLCONF = 'readthedocs.core.urls.subdomain'
29     LOGIN_REDIRECT_URL = '/dashboard/'
30     FORCE_WWW = False
31     SECRET_KEY = 'replace-this-please'  # noqa
32     ATOMIC_REQUESTS = True
33 
34     # Debug settings
35     DEBUG = True
36     TEMPLATE_DEBUG = DEBUG
37     TASTYPIE_FULL_DEBUG = True
38 
39     # Domains and URLs
40     PRODUCTION_DOMAIN = 'readthedocs.org'
41     PUBLIC_DOMAIN = None
42     USE_SUBDOMAIN = False
43     PUBLIC_API_URL = 'https://{0}'.format(PRODUCTION_DOMAIN)
44 
45     ADMINS = (
46         ('Eric Holscher', 'eric@readthedocs.org'),
47         ('Anthony Johnson', 'anthony@readthedocs.org'),
48     )
49     MANAGERS = ADMINS
50 
51     # Email
52     DEFAULT_FROM_EMAIL = 'no-reply@readthedocs.org'
53     SERVER_EMAIL = DEFAULT_FROM_EMAIL
54 
55     # Cookies
56     SESSION_COOKIE_DOMAIN = 'readthedocs.org'
57     SESSION_COOKIE_HTTPONLY = True
58     CSRF_COOKIE_HTTPONLY = True
59 
60     # Application classes
61     @property
62     def INSTALLED_APPS(self):  # noqa
63         apps = [
64             'django.contrib.auth',
65             'django.contrib.admin',
66             'django.contrib.contenttypes',
67             'django.contrib.sessions',
68             'django.contrib.sites',
69             'django.contrib.staticfiles',
70             'django.contrib.messages',
71             'django.contrib.humanize',
72 
73             # third party apps
74             'linaro_django_pagination',
75             'taggit',
76             'guardian',
77             'django_gravatar',
78             'rest_framework',
79             'corsheaders',
80             'copyright',
81             'textclassifier',
82             'annoying',
83             'django_extensions',
84             'messages_extends',
85 
86             # daniellindsleyrocksdahouse
87             'haystack',
88             'tastypie',
89 
90             # our apps
91             'readthedocs.bookmarks',
92             'readthedocs.projects',
93             'readthedocs.builds',
94             'readthedocs.comments',
95             'readthedocs.core',
96             'readthedocs.doc_builder',
97             'readthedocs.oauth',
98             'readthedocs.redirects',
99             'readthedocs.rtd_tests',
100             'readthedocs.restapi',
101             'readthedocs.gold',
102             'readthedocs.payments',
103             'readthedocs.notifications',
104             'readthedocs.integrations',
105 
106 
107             # allauth
108             'allauth',
109             'allauth.account',
110             'allauth.socialaccount',
111             'allauth.socialaccount.providers.github',
112             'allauth.socialaccount.providers.gitlab',
113             'allauth.socialaccount.providers.bitbucket',
114             'allauth.socialaccount.providers.bitbucket_oauth2',
115         ]
116         if ext:
117             apps.append('django_countries')
118             apps.append('readthedocsext.donate')
119             apps.append('readthedocsext.embed')
120         return apps
121 
122     TEMPLATE_LOADERS = (
123         'django.template.loaders.filesystem.Loader',
124         'django.template.loaders.app_directories.Loader',
125     )
126 
127     MIDDLEWARE_CLASSES = (
128         'readthedocs.core.middleware.ProxyMiddleware',
129         'readthedocs.core.middleware.FooterNoSessionMiddleware',
130         'django.middleware.locale.LocaleMiddleware',
131         'django.middleware.common.CommonMiddleware',
132         'django.middleware.security.SecurityMiddleware',
133         'django.middleware.csrf.CsrfViewMiddleware',
134         'django.contrib.auth.middleware.AuthenticationMiddleware',
135         'django.contrib.messages.middleware.MessageMiddleware',
136         'linaro_django_pagination.middleware.PaginationMiddleware',
137         'readthedocs.core.middleware.SubdomainMiddleware',
138         'readthedocs.core.middleware.SingleVersionMiddleware',
139         'corsheaders.middleware.CorsMiddleware',
140     )
141 
142     AUTHENTICATION_BACKENDS = (
143         # Needed to login by username in Django admin, regardless of `allauth`
144         'django.contrib.auth.backends.ModelBackend',
145         # `allauth` specific authentication methods, such as login by e-mail
146         'allauth.account.auth_backends.AuthenticationBackend',
147     )
148 
149     TEMPLATE_CONTEXT_PROCESSORS = (
150         'django.contrib.auth.context_processors.auth',
151         'django.contrib.messages.context_processors.messages',
152         'django.core.context_processors.debug',
153         'django.core.context_processors.i18n',
154         'django.core.context_processors.media',
155         'django.core.context_processors.request',
156         # Read the Docs processor
157         'readthedocs.core.context_processors.readthedocs_processor',
158     )
159 
160     MESSAGE_STORAGE = 'readthedocs.notifications.storages.FallbackUniqueStorage'
161 
162     NOTIFICATION_BACKENDS = [
163         'readthedocs.notifications.backends.EmailBackend',
164         'readthedocs.notifications.backends.SiteBackend',
165     ]
166 
167     # Paths
168     SITE_ROOT = os.path.dirname(
169         os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
170     TEMPLATE_ROOT = os.path.join(SITE_ROOT, 'readthedocs', 'templates')
171     DOCROOT = os.path.join(SITE_ROOT, 'user_builds')
172     UPLOAD_ROOT = os.path.join(SITE_ROOT, 'user_uploads')
173     CNAME_ROOT = os.path.join(SITE_ROOT, 'cnames')
174     LOGS_ROOT = os.path.join(SITE_ROOT, 'logs')
175     PRODUCTION_ROOT = os.path.join(SITE_ROOT, 'prod_artifacts')
176     PRODUCTION_MEDIA_ARTIFACTS = os.path.join(PRODUCTION_ROOT, 'media')
177 
178     # Assets and media
179     STATIC_ROOT = os.path.join(SITE_ROOT, 'media/static/')
180     STATIC_URL = '/static/'
181     MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')
182     MEDIA_URL = '/media/'
183     ADMIN_MEDIA_PREFIX = '/media/admin/'
184     STATICFILES_DIRS = [os.path.join(SITE_ROOT, 'readthedocs', 'static')]
185     TEMPLATE_DIRS = (
186         TEMPLATE_ROOT,
187     )
188 
189     # Cache
190     CACHES = {
191         'default': {
192             'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
193             'PREFIX': 'docs',
194         }
195     }
196     CACHE_MIDDLEWARE_SECONDS = 60
197 
198     # I18n
199     TIME_ZONE = 'America/Chicago'
200     LANGUAGE_CODE = 'en-us'
201     LANGUAGES = (
202         ('ca', gettext('Catalan')),
203         ('en', gettext('English')),
204         ('es', gettext('Spanish')),
205         ('pt-br', gettext('Brazilian Portuguese')),
206         ('nb', gettext('Norwegian Bokmål')),
207         ('fr', gettext('French')),
208         ('ru', gettext('Russian')),
209         ('de', gettext('German')),
210         ('gl', gettext('Galician')),
211         ('vi', gettext('Vietnamese')),
212         ('zh-cn', gettext('Chinese')),
213         ('zh-tw', gettext('Taiwanese')),
214         ('ja', gettext('Japanese')),
215         ('uk', gettext('Ukrainian')),
216         ('it', gettext('Italian')),
217         ('ko', gettext('Korean')),
218     )
219     LOCALE_PATHS = [
220         os.path.join(SITE_ROOT, 'readthedocs', 'locale'),
221     ]
222     USE_I18N = True
223     USE_L10N = True
224 
225     # Celery
226     CELERY_ALWAYS_EAGER = True
227     CELERYD_TASK_TIME_LIMIT = 60 * 60  # 60 minutes
228     CELERY_SEND_TASK_ERROR_EMAILS = False
229     CELERYD_HIJACK_ROOT_LOGGER = False
230     # Don't queue a bunch of tasks in the workers
231     CELERYD_PREFETCH_MULTIPLIER = 1
232     CELERY_CREATE_MISSING_QUEUES = True
233 
234     CELERY_DEFAULT_QUEUE = 'celery'
235 
236     # Docker
237     DOCKER_ENABLE = False
238     DOCKER_IMAGE = 'readthedocs/build:2.0'
239 
240     # All auth
241     ACCOUNT_ADAPTER = 'readthedocs.core.adapters.AccountAdapter'
242     ACCOUNT_EMAIL_REQUIRED = True
243     ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
244     ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
245     ACCOUNT_ACTIVATION_DAYS = 7
246     SOCIALACCOUNT_EMAIL_VERIFICATION = 'none'
247     SOCIALACCOUNT_AUTO_SIGNUP = False
248     SOCIALACCOUNT_PROVIDERS = {
249         'github': {
250             'SCOPE': [
251                 'user:email',
252                 'read:org',
253                 'admin:repo_hook',
254                 'repo:status',
255             ],
256         },
257         'gitlab': {
258             'SCOPE': [
259                 'api',
260                 'read_user',
261             ],
262         },
263     }
264 
265     # CORS
266     CORS_ORIGIN_REGEX_WHITELIST = (
267         '^http://(.+)\.readthedocs\.io$',
268         '^https://(.+)\.readthedocs\.io$'
269     )
270     # So people can post to their accounts
271     CORS_ALLOW_CREDENTIALS = True
272     CORS_ALLOW_HEADERS = (
273         'x-requested-with',
274         'content-type',
275         'accept',
276         'origin',
277         'authorization',
278         'x-csrftoken'
279     )
280 
281     # RTD Settings
282     REPO_LOCK_SECONDS = 30
283     ALLOW_PRIVATE_REPOS = False
284     GROK_API_HOST = 'https://api.grokthedocs.com'
285     SERVE_DOCS = ['public']
286 
287     # Haystack
288     HAYSTACK_CONNECTIONS = {
289         'default': {
290             'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
291         },
292     }
293 
294     # Elasticsearch settings.
295     ES_HOSTS = ['127.0.0.1:9200']
296     ES_DEFAULT_NUM_REPLICAS = 0
297     ES_DEFAULT_NUM_SHARDS = 5
298 
299     ALLOWED_HOSTS = ['*']
300 
301     ABSOLUTE_URL_OVERRIDES = {
302         'auth.user': lambda o: '/profiles/{}/'.format(o.username)
303     }
304 
305     INTERNAL_IPS = ('127.0.0.1',)
306 
307     # Guardian Settings
308     GUARDIAN_RAISE_403 = True
309     ANONYMOUS_USER_ID = -1
310 
311     # Stripe
312     STRIPE_SECRET = None
313     STRIPE_PUBLISHABLE = None
314 
315     # Misc application settings
316     GLOBAL_ANALYTICS_CODE = 'UA-17997319-1'
317     GRAVATAR_DEFAULT_IMAGE = 'https://media.readthedocs.org/images/silhouette.png'  # NOQA
318     COPY_START_YEAR = 2010
319     RESTRICTEDSESSIONS_AUTHED_ONLY = True
320     RESTRUCTUREDTEXT_FILTER_SETTINGS = {
321         'cloak_email_addresses': True,
322         'file_insertion_enabled': False,
323         'raw_enabled': False,
324         'strip_comments': True,
325         'doctitle_xform': True,
326         'sectsubtitle_xform': True,
327         'initial_header_level': 2,
328         'report_level': 5,
329         'syntax_highlight': 'none',
330         'math_output': 'latex',
331         'field_name_limit': 50,
332     }
333     REST_FRAMEWORK = {
334         'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',  # NOQA
335         'PAGE_SIZE': 10,
336     }
337     SILENCED_SYSTEM_CHECKS = ['fields.W342']
338 
339     # Logging
340     LOG_FORMAT = '%(name)s:%(lineno)s[%(process)d]: %(levelname)s %(message)s'
341     LOGGING = {
342         'version': 1,
343         'disable_existing_loggers': True,
344         'formatters': {
345             'default': {
346                 'format': LOG_FORMAT,
347                 'datefmt': '%d/%b/%Y %H:%M:%S',
348             },
349         },
350         'handlers': {
351             'console': {
352                 'level': 'INFO',
353                 'class': 'logging.StreamHandler',
354                 'formatter': 'default'
355             },
356             'debug': {
357                 'level': 'DEBUG',
358                 'class': 'logging.handlers.RotatingFileHandler',
359                 'filename': os.path.join(LOGS_ROOT, 'debug.log'),
360                 'formatter': 'default',
361             },
362         },
363         'loggers': {
364             '': {  # root logger
365                 'handlers': ['debug', 'console'],
366                 # Always send from the root, handlers can filter levels
367                 'level': 'DEBUG',
368             },
369             'readthedocs': {
370                 'handlers': ['debug', 'console'],
371                 'level': 'DEBUG',
372                 # Don't double log at the root logger for these.
373                 'propagate': False,
374             },
375         },
376     }
377
```
--- 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/readthedocs/settings/base.py b/readthedocs/settings/base.py
--- a/readthedocs/settings/base.py
+++ b/readthedocs/settings/base.py
@@ -77,7 +77,6 @@
             'django_gravatar',
             'rest_framework',
             'corsheaders',
-            'copyright',
             'textclassifier',
             'annoying',
             'django_extensions',
@@ -315,7 +314,6 @@
     # Misc application settings
     GLOBAL_ANALYTICS_CODE = 'UA-17997319-1'
     GRAVATAR_DEFAULT_IMAGE = 'https://media.readthedocs.org/images/silhouette.png'  # NOQA
-    COPY_START_YEAR = 2010
     RESTRICTEDSESSIONS_AUTHED_ONLY = True
     RESTRUCTUREDTEXT_FILTER_SETTINGS = {
         'cloak_email_addresses': True,

{"golden_diff": "diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py\n--- a/readthedocs/settings/base.py\n+++ b/readthedocs/settings/base.py\n@@ -77,7 +77,6 @@\n             'django_gravatar',\n             'rest_framework',\n             'corsheaders',\n-            'copyright',\n             'textclassifier',\n             'annoying',\n             'django_extensions',\n@@ -315,7 +314,6 @@\n     # Misc application settings\n     GLOBAL_ANALYTICS_CODE = 'UA-17997319-1'\n     GRAVATAR_DEFAULT_IMAGE = 'https://media.readthedocs.org/images/silhouette.png'  # NOQA\n-    COPY_START_YEAR = 2010\n     RESTRICTEDSESSIONS_AUTHED_ONLY = True\n     RESTRUCTUREDTEXT_FILTER_SETTINGS = {\n         'cloak_email_addresses': True,\n", "issue": "Remove copyright application\nThis was brought up in review and not handled. Doesn't look like we need it any longer?\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# pylint: disable=missing-docstring\n\nfrom __future__ import (\n    absolute_import, division, print_function, unicode_literals)\n\nimport os\n\nfrom readthedocs.core.settings import Settings\n\ntry:\n    import readthedocsext  # noqa\n    ext = True\nexcept ImportError:\n    ext = False\n\n\n_ = gettext = lambda s: s\n\n\nclass CommunityBaseSettings(Settings):\n\n    \"\"\"Community base settings, don't use this directly.\"\"\"\n\n    # Django settings\n    SITE_ID = 1\n    ROOT_URLCONF = 'readthedocs.urls'\n    SUBDOMAIN_URLCONF = 'readthedocs.core.urls.subdomain'\n    LOGIN_REDIRECT_URL = '/dashboard/'\n    FORCE_WWW = False\n    SECRET_KEY = 'replace-this-please'  # noqa\n    ATOMIC_REQUESTS = True\n\n    # Debug settings\n    DEBUG = True\n    TEMPLATE_DEBUG = DEBUG\n    TASTYPIE_FULL_DEBUG = True\n\n    # Domains and URLs\n    PRODUCTION_DOMAIN = 'readthedocs.org'\n    PUBLIC_DOMAIN = None\n    USE_SUBDOMAIN = False\n    PUBLIC_API_URL = 'https://{0}'.format(PRODUCTION_DOMAIN)\n\n    ADMINS = (\n        ('Eric Holscher', 'eric@readthedocs.org'),\n        ('Anthony Johnson', 'anthony@readthedocs.org'),\n    )\n    MANAGERS = ADMINS\n\n    # Email\n    DEFAULT_FROM_EMAIL = 'no-reply@readthedocs.org'\n    SERVER_EMAIL = DEFAULT_FROM_EMAIL\n\n    # Cookies\n    SESSION_COOKIE_DOMAIN = 'readthedocs.org'\n    SESSION_COOKIE_HTTPONLY = True\n    CSRF_COOKIE_HTTPONLY = True\n\n    # Application classes\n    @property\n    def INSTALLED_APPS(self):  # noqa\n        apps = [\n            'django.contrib.auth',\n            'django.contrib.admin',\n            'django.contrib.contenttypes',\n            'django.contrib.sessions',\n            'django.contrib.sites',\n            'django.contrib.staticfiles',\n            'django.contrib.messages',\n            'django.contrib.humanize',\n\n            # third party apps\n            'linaro_django_pagination',\n            'taggit',\n            'guardian',\n            'django_gravatar',\n            'rest_framework',\n            'corsheaders',\n            'copyright',\n            'textclassifier',\n            'annoying',\n            'django_extensions',\n            'messages_extends',\n\n            # daniellindsleyrocksdahouse\n            'haystack',\n            'tastypie',\n\n            # our apps\n            'readthedocs.bookmarks',\n            'readthedocs.projects',\n            'readthedocs.builds',\n            'readthedocs.comments',\n            'readthedocs.core',\n            'readthedocs.doc_builder',\n            'readthedocs.oauth',\n            'readthedocs.redirects',\n            'readthedocs.rtd_tests',\n            'readthedocs.restapi',\n            'readthedocs.gold',\n            'readthedocs.payments',\n            'readthedocs.notifications',\n            'readthedocs.integrations',\n\n\n            # allauth\n            'allauth',\n            'allauth.account',\n            'allauth.socialaccount',\n            'allauth.socialaccount.providers.github',\n            'allauth.socialaccount.providers.gitlab',\n            'allauth.socialaccount.providers.bitbucket',\n            'allauth.socialaccount.providers.bitbucket_oauth2',\n        ]\n        if ext:\n            apps.append('django_countries')\n            apps.append('readthedocsext.donate')\n            apps.append('readthedocsext.embed')\n        return apps\n\n    TEMPLATE_LOADERS = (\n        'django.template.loaders.filesystem.Loader',\n        'django.template.loaders.app_directories.Loader',\n    )\n\n    MIDDLEWARE_CLASSES = (\n        'readthedocs.core.middleware.ProxyMiddleware',\n        'readthedocs.core.middleware.FooterNoSessionMiddleware',\n        'django.middleware.locale.LocaleMiddleware',\n        'django.middleware.common.CommonMiddleware',\n        'django.middleware.security.SecurityMiddleware',\n        'django.middleware.csrf.CsrfViewMiddleware',\n        'django.contrib.auth.middleware.AuthenticationMiddleware',\n        'django.contrib.messages.middleware.MessageMiddleware',\n        'linaro_django_pagination.middleware.PaginationMiddleware',\n        'readthedocs.core.middleware.SubdomainMiddleware',\n        'readthedocs.core.middleware.SingleVersionMiddleware',\n        'corsheaders.middleware.CorsMiddleware',\n    )\n\n    AUTHENTICATION_BACKENDS = (\n        # Needed to login by username in Django admin, regardless of `allauth`\n        'django.contrib.auth.backends.ModelBackend',\n        # `allauth` specific authentication methods, such as login by e-mail\n        'allauth.account.auth_backends.AuthenticationBackend',\n    )\n\n    TEMPLATE_CONTEXT_PROCESSORS = (\n        'django.contrib.auth.context_processors.auth',\n        'django.contrib.messages.context_processors.messages',\n        'django.core.context_processors.debug',\n        'django.core.context_processors.i18n',\n        'django.core.context_processors.media',\n        'django.core.context_processors.request',\n        # Read the Docs processor\n        'readthedocs.core.context_processors.readthedocs_processor',\n    )\n\n    MESSAGE_STORAGE = 'readthedocs.notifications.storages.FallbackUniqueStorage'\n\n    NOTIFICATION_BACKENDS = [\n        'readthedocs.notifications.backends.EmailBackend',\n        'readthedocs.notifications.backends.SiteBackend',\n    ]\n\n    # Paths\n    SITE_ROOT = os.path.dirname(\n        os.path.dirname(os.path.dirname(os.path.abspath(__file__))))\n    TEMPLATE_ROOT = os.path.join(SITE_ROOT, 'readthedocs', 'templates')\n    DOCROOT = os.path.join(SITE_ROOT, 'user_builds')\n    UPLOAD_ROOT = os.path.join(SITE_ROOT, 'user_uploads')\n    CNAME_ROOT = os.path.join(SITE_ROOT, 'cnames')\n    LOGS_ROOT = os.path.join(SITE_ROOT, 'logs')\n    PRODUCTION_ROOT = os.path.join(SITE_ROOT, 'prod_artifacts')\n    PRODUCTION_MEDIA_ARTIFACTS = os.path.join(PRODUCTION_ROOT, 'media')\n\n    # Assets and media\n    STATIC_ROOT = os.path.join(SITE_ROOT, 'media/static/')\n    STATIC_URL = '/static/'\n    MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')\n    MEDIA_URL = '/media/'\n    ADMIN_MEDIA_PREFIX = '/media/admin/'\n    STATICFILES_DIRS = [os.path.join(SITE_ROOT, 'readthedocs', 'static')]\n    TEMPLATE_DIRS = (\n        TEMPLATE_ROOT,\n    )\n\n    # Cache\n    CACHES = {\n        'default': {\n            'BACKEND': 'django.core.cache.backends.dummy.DummyCache',\n            'PREFIX': 'docs',\n        }\n    }\n    CACHE_MIDDLEWARE_SECONDS = 60\n\n    # I18n\n    TIME_ZONE = 'America/Chicago'\n    LANGUAGE_CODE = 'en-us'\n    LANGUAGES = (\n        ('ca', gettext('Catalan')),\n        ('en', gettext('English')),\n        ('es', gettext('Spanish')),\n        ('pt-br', gettext('Brazilian Portuguese')),\n        ('nb', gettext('Norwegian Bokm\u00e5l')),\n        ('fr', gettext('French')),\n        ('ru', gettext('Russian')),\n        ('de', gettext('German')),\n        ('gl', gettext('Galician')),\n        ('vi', gettext('Vietnamese')),\n        ('zh-cn', gettext('Chinese')),\n        ('zh-tw', gettext('Taiwanese')),\n        ('ja', gettext('Japanese')),\n        ('uk', gettext('Ukrainian')),\n        ('it', gettext('Italian')),\n        ('ko', gettext('Korean')),\n    )\n    LOCALE_PATHS = [\n        os.path.join(SITE_ROOT, 'readthedocs', 'locale'),\n    ]\n    USE_I18N = True\n    USE_L10N = True\n\n    # Celery\n    CELERY_ALWAYS_EAGER = True\n    CELERYD_TASK_TIME_LIMIT = 60 * 60  # 60 minutes\n    CELERY_SEND_TASK_ERROR_EMAILS = False\n    CELERYD_HIJACK_ROOT_LOGGER = False\n    # Don't queue a bunch of tasks in the workers\n    CELERYD_PREFETCH_MULTIPLIER = 1\n    CELERY_CREATE_MISSING_QUEUES = True\n\n    CELERY_DEFAULT_QUEUE = 'celery'\n\n    # Docker\n    DOCKER_ENABLE = False\n    DOCKER_IMAGE = 'readthedocs/build:2.0'\n\n    # All auth\n    ACCOUNT_ADAPTER = 'readthedocs.core.adapters.AccountAdapter'\n    ACCOUNT_EMAIL_REQUIRED = True\n    ACCOUNT_EMAIL_VERIFICATION = 'mandatory'\n    ACCOUNT_AUTHENTICATION_METHOD = 'username_email'\n    ACCOUNT_ACTIVATION_DAYS = 7\n    SOCIALACCOUNT_EMAIL_VERIFICATION = 'none'\n    SOCIALACCOUNT_AUTO_SIGNUP = False\n    SOCIALACCOUNT_PROVIDERS = {\n        'github': {\n            'SCOPE': [\n                'user:email',\n                'read:org',\n                'admin:repo_hook',\n                'repo:status',\n            ],\n        },\n        'gitlab': {\n            'SCOPE': [\n                'api',\n                'read_user',\n            ],\n        },\n    }\n\n    # CORS\n    CORS_ORIGIN_REGEX_WHITELIST = (\n        '^http://(.+)\\.readthedocs\\.io$',\n        '^https://(.+)\\.readthedocs\\.io$'\n    )\n    # So people can post to their accounts\n    CORS_ALLOW_CREDENTIALS = True\n    CORS_ALLOW_HEADERS = (\n        'x-requested-with',\n        'content-type',\n        'accept',\n        'origin',\n        'authorization',\n        'x-csrftoken'\n    )\n\n    # RTD Settings\n    REPO_LOCK_SECONDS = 30\n    ALLOW_PRIVATE_REPOS = False\n    GROK_API_HOST = 'https://api.grokthedocs.com'\n    SERVE_DOCS = ['public']\n\n    # Haystack\n    HAYSTACK_CONNECTIONS = {\n        'default': {\n            'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',\n        },\n    }\n\n    # Elasticsearch settings.\n    ES_HOSTS = ['127.0.0.1:9200']\n    ES_DEFAULT_NUM_REPLICAS = 0\n    ES_DEFAULT_NUM_SHARDS = 5\n\n    ALLOWED_HOSTS = ['*']\n\n    ABSOLUTE_URL_OVERRIDES = {\n        'auth.user': lambda o: '/profiles/{}/'.format(o.username)\n    }\n\n    INTERNAL_IPS = ('127.0.0.1',)\n\n    # Guardian Settings\n    GUARDIAN_RAISE_403 = True\n    ANONYMOUS_USER_ID = -1\n\n    # Stripe\n    STRIPE_SECRET = None\n    STRIPE_PUBLISHABLE = None\n\n    # Misc application settings\n    GLOBAL_ANALYTICS_CODE = 'UA-17997319-1'\n    GRAVATAR_DEFAULT_IMAGE = 'https://media.readthedocs.org/images/silhouette.png'  # NOQA\n    COPY_START_YEAR = 2010\n    RESTRICTEDSESSIONS_AUTHED_ONLY = True\n    RESTRUCTUREDTEXT_FILTER_SETTINGS = {\n        'cloak_email_addresses': True,\n        'file_insertion_enabled': False,\n        'raw_enabled': False,\n        'strip_comments': True,\n        'doctitle_xform': True,\n        'sectsubtitle_xform': True,\n        'initial_header_level': 2,\n        'report_level': 5,\n        'syntax_highlight': 'none',\n        'math_output': 'latex',\n        'field_name_limit': 50,\n    }\n    REST_FRAMEWORK = {\n        'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',  # NOQA\n        'PAGE_SIZE': 10,\n    }\n    SILENCED_SYSTEM_CHECKS = ['fields.W342']\n\n    # Logging\n    LOG_FORMAT = '%(name)s:%(lineno)s[%(process)d]: %(levelname)s %(message)s'\n    LOGGING = {\n        'version': 1,\n        'disable_existing_loggers': True,\n        'formatters': {\n            'default': {\n                'format': LOG_FORMAT,\n                'datefmt': '%d/%b/%Y %H:%M:%S',\n            },\n        },\n        'handlers': {\n            'console': {\n                'level': 'INFO',\n                'class': 'logging.StreamHandler',\n                'formatter': 'default'\n            },\n            'debug': {\n                'level': 'DEBUG',\n                'class': 'logging.handlers.RotatingFileHandler',\n                'filename': os.path.join(LOGS_ROOT, 'debug.log'),\n                'formatter': 'default',\n            },\n        },\n        'loggers': {\n            '': {  # root logger\n                'handlers': ['debug', 'console'],\n                # Always send from the root, handlers can filter levels\n                'level': 'DEBUG',\n            },\n            'readthedocs': {\n                'handlers': ['debug', 'console'],\n                'level': 'DEBUG',\n                # Don't double log at the root logger for these.\n                'propagate': False,\n            },\n        },\n    }\n", "path": "readthedocs/settings/base.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# pylint: disable=missing-docstring\n\nfrom __future__ import (\n    absolute_import, division, print_function, unicode_literals)\n\nimport os\n\nfrom readthedocs.core.settings import Settings\n\ntry:\n    import readthedocsext  # noqa\n    ext = True\nexcept ImportError:\n    ext = False\n\n\n_ = gettext = lambda s: s\n\n\nclass CommunityBaseSettings(Settings):\n\n    \"\"\"Community base settings, don't use this directly.\"\"\"\n\n    # Django settings\n    SITE_ID = 1\n    ROOT_URLCONF = 'readthedocs.urls'\n    SUBDOMAIN_URLCONF = 'readthedocs.core.urls.subdomain'\n    LOGIN_REDIRECT_URL = '/dashboard/'\n    FORCE_WWW = False\n    SECRET_KEY = 'replace-this-please'  # noqa\n    ATOMIC_REQUESTS = True\n\n    # Debug settings\n    DEBUG = True\n    TEMPLATE_DEBUG = DEBUG\n    TASTYPIE_FULL_DEBUG = True\n\n    # Domains and URLs\n    PRODUCTION_DOMAIN = 'readthedocs.org'\n    PUBLIC_DOMAIN = None\n    USE_SUBDOMAIN = False\n    PUBLIC_API_URL = 'https://{0}'.format(PRODUCTION_DOMAIN)\n\n    ADMINS = (\n        ('Eric Holscher', 'eric@readthedocs.org'),\n        ('Anthony Johnson', 'anthony@readthedocs.org'),\n    )\n    MANAGERS = ADMINS\n\n    # Email\n    DEFAULT_FROM_EMAIL = 'no-reply@readthedocs.org'\n    SERVER_EMAIL = DEFAULT_FROM_EMAIL\n\n    # Cookies\n    SESSION_COOKIE_DOMAIN = 'readthedocs.org'\n    SESSION_COOKIE_HTTPONLY = True\n    CSRF_COOKIE_HTTPONLY = True\n\n    # Application classes\n    @property\n    def INSTALLED_APPS(self):  # noqa\n        apps = [\n            'django.contrib.auth',\n            'django.contrib.admin',\n            'django.contrib.contenttypes',\n            'django.contrib.sessions',\n            'django.contrib.sites',\n            'django.contrib.staticfiles',\n            'django.contrib.messages',\n            'django.contrib.humanize',\n\n            # third party apps\n            'linaro_django_pagination',\n            'taggit',\n            'guardian',\n            'django_gravatar',\n            'rest_framework',\n            'corsheaders',\n            'textclassifier',\n            'annoying',\n            'django_extensions',\n            'messages_extends',\n\n            # daniellindsleyrocksdahouse\n            'haystack',\n            'tastypie',\n\n            # our apps\n            'readthedocs.bookmarks',\n            'readthedocs.projects',\n            'readthedocs.builds',\n            'readthedocs.comments',\n            'readthedocs.core',\n            'readthedocs.doc_builder',\n            'readthedocs.oauth',\n            'readthedocs.redirects',\n            'readthedocs.rtd_tests',\n            'readthedocs.restapi',\n            'readthedocs.gold',\n            'readthedocs.payments',\n            'readthedocs.notifications',\n            'readthedocs.integrations',\n\n\n            # allauth\n            'allauth',\n            'allauth.account',\n            'allauth.socialaccount',\n            'allauth.socialaccount.providers.github',\n            'allauth.socialaccount.providers.gitlab',\n            'allauth.socialaccount.providers.bitbucket',\n            'allauth.socialaccount.providers.bitbucket_oauth2',\n        ]\n        if ext:\n            apps.append('django_countries')\n            apps.append('readthedocsext.donate')\n            apps.append('readthedocsext.embed')\n        return apps\n\n    TEMPLATE_LOADERS = (\n        'django.template.loaders.filesystem.Loader',\n        'django.template.loaders.app_directories.Loader',\n    )\n\n    MIDDLEWARE_CLASSES = (\n        'readthedocs.core.middleware.ProxyMiddleware',\n        'readthedocs.core.middleware.FooterNoSessionMiddleware',\n        'django.middleware.locale.LocaleMiddleware',\n        'django.middleware.common.CommonMiddleware',\n        'django.middleware.security.SecurityMiddleware',\n        'django.middleware.csrf.CsrfViewMiddleware',\n        'django.contrib.auth.middleware.AuthenticationMiddleware',\n        'django.contrib.messages.middleware.MessageMiddleware',\n        'linaro_django_pagination.middleware.PaginationMiddleware',\n        'readthedocs.core.middleware.SubdomainMiddleware',\n        'readthedocs.core.middleware.SingleVersionMiddleware',\n        'corsheaders.middleware.CorsMiddleware',\n    )\n\n    AUTHENTICATION_BACKENDS = (\n        # Needed to login by username in Django admin, regardless of `allauth`\n        'django.contrib.auth.backends.ModelBackend',\n        # `allauth` specific authentication methods, such as login by e-mail\n        'allauth.account.auth_backends.AuthenticationBackend',\n    )\n\n    TEMPLATE_CONTEXT_PROCESSORS = (\n        'django.contrib.auth.context_processors.auth',\n        'django.contrib.messages.context_processors.messages',\n        'django.core.context_processors.debug',\n        'django.core.context_processors.i18n',\n        'django.core.context_processors.media',\n        'django.core.context_processors.request',\n        # Read the Docs processor\n        'readthedocs.core.context_processors.readthedocs_processor',\n    )\n\n    MESSAGE_STORAGE = 'readthedocs.notifications.storages.FallbackUniqueStorage'\n\n    NOTIFICATION_BACKENDS = [\n        'readthedocs.notifications.backends.EmailBackend',\n        'readthedocs.notifications.backends.SiteBackend',\n    ]\n\n    # Paths\n    SITE_ROOT = os.path.dirname(\n        os.path.dirname(os.path.dirname(os.path.abspath(__file__))))\n    TEMPLATE_ROOT = os.path.join(SITE_ROOT, 'readthedocs', 'templates')\n    DOCROOT = os.path.join(SITE_ROOT, 'user_builds')\n    UPLOAD_ROOT = os.path.join(SITE_ROOT, 'user_uploads')\n    CNAME_ROOT = os.path.join(SITE_ROOT, 'cnames')\n    LOGS_ROOT = os.path.join(SITE_ROOT, 'logs')\n    PRODUCTION_ROOT = os.path.join(SITE_ROOT, 'prod_artifacts')\n    PRODUCTION_MEDIA_ARTIFACTS = os.path.join(PRODUCTION_ROOT, 'media')\n\n    # Assets and media\n    STATIC_ROOT = os.path.join(SITE_ROOT, 'media/static/')\n    STATIC_URL = '/static/'\n    MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')\n    MEDIA_URL = '/media/'\n    ADMIN_MEDIA_PREFIX = '/media/admin/'\n    STATICFILES_DIRS = [os.path.join(SITE_ROOT, 'readthedocs', 'static')]\n    TEMPLATE_DIRS = (\n        TEMPLATE_ROOT,\n    )\n\n    # Cache\n    CACHES = {\n        'default': {\n            'BACKEND': 'django.core.cache.backends.dummy.DummyCache',\n            'PREFIX': 'docs',\n        }\n    }\n    CACHE_MIDDLEWARE_SECONDS = 60\n\n    # I18n\n    TIME_ZONE = 'America/Chicago'\n    LANGUAGE_CODE = 'en-us'\n    LANGUAGES = (\n        ('ca', gettext('Catalan')),\n        ('en', gettext('English')),\n        ('es', gettext('Spanish')),\n        ('pt-br', gettext('Brazilian Portuguese')),\n        ('nb', gettext('Norwegian Bokm\u00e5l')),\n        ('fr', gettext('French')),\n        ('ru', gettext('Russian')),\n        ('de', gettext('German')),\n        ('gl', gettext('Galician')),\n        ('vi', gettext('Vietnamese')),\n        ('zh-cn', gettext('Chinese')),\n        ('zh-tw', gettext('Taiwanese')),\n        ('ja', gettext('Japanese')),\n        ('uk', gettext('Ukrainian')),\n        ('it', gettext('Italian')),\n        ('ko', gettext('Korean')),\n    )\n    LOCALE_PATHS = [\n        os.path.join(SITE_ROOT, 'readthedocs', 'locale'),\n    ]\n    USE_I18N = True\n    USE_L10N = True\n\n    # Celery\n    CELERY_ALWAYS_EAGER = True\n    CELERYD_TASK_TIME_LIMIT = 60 * 60  # 60 minutes\n    CELERY_SEND_TASK_ERROR_EMAILS = False\n    CELERYD_HIJACK_ROOT_LOGGER = False\n    # Don't queue a bunch of tasks in the workers\n    CELERYD_PREFETCH_MULTIPLIER = 1\n    CELERY_CREATE_MISSING_QUEUES = True\n\n    CELERY_DEFAULT_QUEUE = 'celery'\n\n    # Docker\n    DOCKER_ENABLE = False\n    DOCKER_IMAGE = 'readthedocs/build:2.0'\n\n    # All auth\n    ACCOUNT_ADAPTER = 'readthedocs.core.adapters.AccountAdapter'\n    ACCOUNT_EMAIL_REQUIRED = True\n    ACCOUNT_EMAIL_VERIFICATION = 'mandatory'\n    ACCOUNT_AUTHENTICATION_METHOD = 'username_email'\n    ACCOUNT_ACTIVATION_DAYS = 7\n    SOCIALACCOUNT_EMAIL_VERIFICATION = 'none'\n    SOCIALACCOUNT_AUTO_SIGNUP = False\n    SOCIALACCOUNT_PROVIDERS = {\n        'github': {\n            'SCOPE': [\n                'user:email',\n                'read:org',\n                'admin:repo_hook',\n                'repo:status',\n            ],\n        },\n        'gitlab': {\n            'SCOPE': [\n                'api',\n                'read_user',\n            ],\n        },\n    }\n\n    # CORS\n    CORS_ORIGIN_REGEX_WHITELIST = (\n        '^http://(.+)\\.readthedocs\\.io$',\n        '^https://(.+)\\.readthedocs\\.io$'\n    )\n    # So people can post to their accounts\n    CORS_ALLOW_CREDENTIALS = True\n    CORS_ALLOW_HEADERS = (\n        'x-requested-with',\n        'content-type',\n        'accept',\n        'origin',\n        'authorization',\n        'x-csrftoken'\n    )\n\n    # RTD Settings\n    REPO_LOCK_SECONDS = 30\n    ALLOW_PRIVATE_REPOS = False\n    GROK_API_HOST = 'https://api.grokthedocs.com'\n    SERVE_DOCS = ['public']\n\n    # Haystack\n    HAYSTACK_CONNECTIONS = {\n        'default': {\n            'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',\n        },\n    }\n\n    # Elasticsearch settings.\n    ES_HOSTS = ['127.0.0.1:9200']\n    ES_DEFAULT_NUM_REPLICAS = 0\n    ES_DEFAULT_NUM_SHARDS = 5\n\n    ALLOWED_HOSTS = ['*']\n\n    ABSOLUTE_URL_OVERRIDES = {\n        'auth.user': lambda o: '/profiles/{}/'.format(o.username)\n    }\n\n    INTERNAL_IPS = ('127.0.0.1',)\n\n    # Guardian Settings\n    GUARDIAN_RAISE_403 = True\n    ANONYMOUS_USER_ID = -1\n\n    # Stripe\n    STRIPE_SECRET = None\n    STRIPE_PUBLISHABLE = None\n\n    # Misc application settings\n    GLOBAL_ANALYTICS_CODE = 'UA-17997319-1'\n    GRAVATAR_DEFAULT_IMAGE = 'https://media.readthedocs.org/images/silhouette.png'  # NOQA\n    RESTRICTEDSESSIONS_AUTHED_ONLY = True\n    RESTRUCTUREDTEXT_FILTER_SETTINGS = {\n        'cloak_email_addresses': True,\n        'file_insertion_enabled': False,\n        'raw_enabled': False,\n        'strip_comments': True,\n        'doctitle_xform': True,\n        'sectsubtitle_xform': True,\n        'initial_header_level': 2,\n        'report_level': 5,\n        'syntax_highlight': 'none',\n        'math_output': 'latex',\n        'field_name_limit': 50,\n    }\n    REST_FRAMEWORK = {\n        'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',  # NOQA\n        'PAGE_SIZE': 10,\n    }\n    SILENCED_SYSTEM_CHECKS = ['fields.W342']\n\n    # Logging\n    LOG_FORMAT = '%(name)s:%(lineno)s[%(process)d]: %(levelname)s %(message)s'\n    LOGGING = {\n        'version': 1,\n        'disable_existing_loggers': True,\n        'formatters': {\n            'default': {\n                'format': LOG_FORMAT,\n                'datefmt': '%d/%b/%Y %H:%M:%S',\n            },\n        },\n        'handlers': {\n            'console': {\n                'level': 'INFO',\n                'class': 'logging.StreamHandler',\n                'formatter': 'default'\n            },\n            'debug': {\n                'level': 'DEBUG',\n                'class': 'logging.handlers.RotatingFileHandler',\n                'filename': os.path.join(LOGS_ROOT, 'debug.log'),\n                'formatter': 'default',\n            },\n        },\n        'loggers': {\n            '': {  # root logger\n                'handlers': ['debug', 'console'],\n                # Always send from the root, handlers can filter levels\n                'level': 'DEBUG',\n            },\n            'readthedocs': {\n                'handlers': ['debug', 'console'],\n                'level': 'DEBUG',\n                # Don't double log at the root logger for these.\n                'propagate': False,\n            },\n        },\n    }\n", "path": "readthedocs/settings/base.py"}]}