We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove RabbitMQ config settings
Since we have removed RabbitMQ as a message broker, we would also like to remove the settings for it in the `settings/common.py`.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `settings/common.py`
Content:
```
1 """
2 Django settings for evalai project.
3 
4 Generated by 'django-admin startproject' using Django 1.10.2.
5 
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.10/topics/settings/
8 
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.10/ref/settings/
11 """
12 
13 import datetime
14 import os
15 import sys
16 
17 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
18 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19 APPS_DIR = os.path.join(BASE_DIR, 'apps')
20 
21 sys.path.append(APPS_DIR)
22 
23 # Quick-start development settings - unsuitable for production
24 # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
25 
26 # SECURITY WARNING: keep the secret key used in production secret!
27 SECRET_KEY = os.environ.get('SECRET_KEY', 'random_secret_key')
28 
29 # SECURITY WARNING: don't run with debug turned on in production!
30 DEBUG = True
31 
32 TEST = False
33 
34 ALLOWED_HOSTS = []
35 
36 
37 # Application definition
38 
39 DEFAULT_APPS = [
40     'django.contrib.admin',
41     'django.contrib.auth',
42     'django.contrib.contenttypes',
43     'django.contrib.sessions',
44     'django.contrib.messages',
45     'django.contrib.staticfiles',
46     'django.contrib.sites',
47 ]
48 
49 OUR_APPS = [
50     'accounts',
51     'analytics',
52     'base',
53     'challenges',
54     'hosts',
55     'jobs',
56     'participants',
57     'web',
58 ]
59 
60 THIRD_PARTY_APPS = [
61     'allauth',
62     'allauth.account',
63     'corsheaders',
64     'django_ses',
65     'import_export',
66     'rest_auth',
67     'rest_auth.registration',
68     'rest_framework.authtoken',
69     'rest_framework',
70     'rest_framework_docs',
71     'rest_framework_expiring_authtoken',
72     'drf_yasg',
73 ]
74 
75 INSTALLED_APPS = DEFAULT_APPS + OUR_APPS + THIRD_PARTY_APPS
76 
77 MIDDLEWARE = [
78     'corsheaders.middleware.CorsMiddleware',
79     'django.middleware.security.SecurityMiddleware',
80     'django.contrib.sessions.middleware.SessionMiddleware',
81     'django.middleware.common.CommonMiddleware',
82     'django.middleware.csrf.CsrfViewMiddleware',
83     'django.contrib.auth.middleware.AuthenticationMiddleware',
84     'django.contrib.messages.middleware.MessageMiddleware',
85     'django.middleware.clickjacking.XFrameOptionsMiddleware',
86 ]
87 
88 ROOT_URLCONF = 'evalai.urls'
89 
90 
91 TEMPLATES = [
92     {
93         'BACKEND': 'django.template.backends.django.DjangoTemplates',
94         'DIRS': [],
95         'APP_DIRS': True,
96         'OPTIONS': {
97             'context_processors': [
98                 'django.template.context_processors.debug',
99                 'django.template.context_processors.request',
100                 'django.contrib.auth.context_processors.auth',
101                 'django.contrib.messages.context_processors.messages',
102             ],
103         },
104     },
105 ]
106 
107 WSGI_APPLICATION = 'evalai.wsgi.application'
108 
109 
110 # Password validation
111 # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
112 
113 AUTH_PASSWORD_VALIDATORS = [
114     {
115         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',  # noqa
116     },
117     {
118         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',  # noqa
119     },
120     {
121         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',  # noqa
122     },
123     {
124         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',  # noqa
125     },
126 ]
127 
128 
129 # Internationalization
130 # https://docs.djangoproject.com/en/1.10/topics/i18n/
131 
132 LANGUAGE_CODE = 'en-us'
133 
134 TIME_ZONE = 'UTC'
135 
136 USE_I18N = True
137 
138 USE_L10N = True
139 
140 USE_TZ = True
141 
142 # Static files (CSS, JavaScript, Images)
143 # https://docs.djangoproject.com/en/1.10/howto/static-files/
144 
145 STATIC_URL = '/static/'
146 STATIC_ROOT = os.path.join(BASE_DIR, 'static')
147 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
148 MEDIA_URL = "/media/"
149 
150 SITE_ID = 1
151 
152 REST_FRAMEWORK = {
153     'DEFAULT_PAGINATION_CLASS': (
154         'rest_framework.pagination.LimitOffsetPagination'),
155     'PAGE_SIZE': 10,
156     'DEFAULT_PERMISSION_CLASSES': [
157         'rest_framework.permissions.IsAuthenticatedOrReadOnly'
158     ],
159     'DEFAULT_AUTHENTICATION_CLASSES': [
160         'rest_framework_expiring_authtoken.authentication.ExpiringTokenAuthentication',
161     ],
162     'TEST_REQUEST_DEFAULT_FORMAT': 'json',
163     'DEFAULT_THROTTLE_CLASSES': (
164         'rest_framework.throttling.AnonRateThrottle',
165         'rest_framework.throttling.UserRateThrottle'
166     ),
167     'DEFAULT_THROTTLE_RATES': {
168         'anon': '100/minute',
169         'user': '100/minute'
170     },
171     'DEFAULT_RENDERER_CLASSES': (
172         'rest_framework.renderers.JSONRenderer',
173     )
174 }
175 
176 # ALLAUTH SETTINGS
177 ACCOUNT_EMAIL_REQUIRED = True
178 OLD_PASSWORD_FIELD_ENABLED = True
179 ACCOUNT_CONFIRM_EMAIL_ON_GET = True
180 ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = '/api/auth/email-confirmed/'
181 ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = '/api/auth/email-confirmed/'
182 
183 AUTHENTICATION_BACKENDS = (
184     # Needed to login by username in Django admin, regardless of `allauth`
185     'django.contrib.auth.backends.ModelBackend',
186     # `allauth` specific authentication methods, such as login by e-mail
187     'allauth.account.auth_backends.AuthenticationBackend',
188 )
189 
190 # CORS Settings
191 CORS_ORIGIN_ALLOW_ALL = True
192 
193 # REST Framework Expiring Tokens Configuration
194 EXPIRING_TOKEN_LIFESPAN = datetime.timedelta(days=7)
195 
196 # Logging
197 LOGGING = {
198     'version': 1,
199     'disable_existing_loggers': False,
200     'root': {
201         'level': 'INFO',
202         'handlers': ['console'],
203     },
204     'filters': {
205         'require_debug_false': {
206             '()': 'django.utils.log.RequireDebugFalse',
207         },
208         'require_debug_true': {
209             '()': 'django.utils.log.RequireDebugTrue',
210         }
211     },
212     'formatters': {
213         'simple': {
214             'format': '[%(asctime)s] %(levelname)s %(message)s',
215             'datefmt': '%Y-%m-%d %H:%M:%S'
216         },
217         'verbose': {
218             'format': '[%(asctime)s] %(levelname)s %(module)s %(message)s',
219             'datefmt': '%Y-%m-%d %H:%M:%S'
220         }
221     },
222     'handlers': {
223         'console': {
224             'level': 'INFO',
225             'filters': ['require_debug_true'],
226             'class': 'logging.StreamHandler',
227             'formatter': 'simple'
228         },
229         'logfile': {
230             'level': 'DEBUG',
231             'class': 'logging.handlers.RotatingFileHandler',
232             'filename': os.path.join(BASE_DIR, 'django.log'),
233             'maxBytes': 50000,
234             'backupCount': 10,
235             'formatter': 'verbose'
236         },
237         'mail_admins': {
238             'level': 'ERROR',
239             'class': 'django.utils.log.AdminEmailHandler',
240             'filters': ['require_debug_false'],
241         }
242     },
243     'loggers': {
244         'django': {
245             'handlers': ['console'],
246             'propagate': False,
247         },
248         'django.request': {
249             'handlers': ['mail_admins'],
250             'level': 'ERROR',
251             'propagate': False,
252         },
253         'django.security': {
254             'handlers': ['mail_admins'],
255             'level': 'ERROR',
256             'propagate': False,
257         },
258         'django.db.backends': {
259             'handlers': ['mail_admins'],
260             'level': 'ERROR',
261             'propagate': False,
262         }
263     }
264 }
265 
266 CACHES = {
267     'default': {
268         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
269     }
270 }
271 
272 RABBITMQ_PARAMETERS = {
273     'HOST': os.environ.get("RABBITMQ_HOST", 'localhost'),
274     'EVALAI_EXCHANGE': {
275         'NAME': 'evalai_submissions',
276         'TYPE': 'topic',
277     },
278     'SUBMISSION_QUEUE': 'submission_task_queue',
279 }
280 
281 # The maximum size in bytes for request body
282 # https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size
283 FILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB
284 DATA_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB
285 
286 # To make usermame field read-only, customized serializer is defined.
287 REST_AUTH_SERIALIZERS = {
288     'USER_DETAILS_SERIALIZER': 'accounts.serializers.ProfileSerializer',
289 }
290 
291 # For inviting users to participant and host teams.
292 ADMIN_EMAIL = "admin@cloudcv.org"
293 CLOUDCV_TEAM_EMAIL = "EvalAI Team <team@cloudcv.org>"
294 
295 SWAGGER_SETTINGS = {
296     'DEFAULT_INFO': 'evalai.urls.swagger_api_info',
297     'SECURITY_DEFINITIONS': {
298         'Token Authentication': {
299             'type': 'apiKey',
300             'name': 'Authorization',
301             'in': 'header'
302         },
303     }
304 }
305 
306 REDOC_SETTINGS = {
307     'SPEC_URL': ('docs.yaml', {'format': '.yaml'}),
308 }
309
```
--- 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/settings/common.py b/settings/common.py
--- a/settings/common.py
+++ b/settings/common.py
@@ -269,15 +269,6 @@
     }
 }
 
-RABBITMQ_PARAMETERS = {
-    'HOST': os.environ.get("RABBITMQ_HOST", 'localhost'),
-    'EVALAI_EXCHANGE': {
-        'NAME': 'evalai_submissions',
-        'TYPE': 'topic',
-    },
-    'SUBMISSION_QUEUE': 'submission_task_queue',
-}
-
 # The maximum size in bytes for request body
 # https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size
 FILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB

{"golden_diff": "diff --git a/settings/common.py b/settings/common.py\n--- a/settings/common.py\n+++ b/settings/common.py\n@@ -269,15 +269,6 @@\n     }\n }\n \n-RABBITMQ_PARAMETERS = {\n-    'HOST': os.environ.get(\"RABBITMQ_HOST\", 'localhost'),\n-    'EVALAI_EXCHANGE': {\n-        'NAME': 'evalai_submissions',\n-        'TYPE': 'topic',\n-    },\n-    'SUBMISSION_QUEUE': 'submission_task_queue',\n-}\n-\n # The maximum size in bytes for request body\n # https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size\n FILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB\n", "issue": "Remove RabbitMQ config settings\nSince we have removed RabbitMQ as a message broker, we would also like to remove the settings for it in the `settings/common.py`.\n", "before_files": [{"content": "\"\"\"\nDjango settings for evalai project.\n\nGenerated by 'django-admin startproject' using Django 1.10.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.10/ref/settings/\n\"\"\"\n\nimport datetime\nimport os\nimport sys\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nAPPS_DIR = os.path.join(BASE_DIR, 'apps')\n\nsys.path.append(APPS_DIR)\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os.environ.get('SECRET_KEY', 'random_secret_key')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nTEST = False\n\nALLOWED_HOSTS = []\n\n\n# Application definition\n\nDEFAULT_APPS = [\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.contrib.sites',\n]\n\nOUR_APPS = [\n    'accounts',\n    'analytics',\n    'base',\n    'challenges',\n    'hosts',\n    'jobs',\n    'participants',\n    'web',\n]\n\nTHIRD_PARTY_APPS = [\n    'allauth',\n    'allauth.account',\n    'corsheaders',\n    'django_ses',\n    'import_export',\n    'rest_auth',\n    'rest_auth.registration',\n    'rest_framework.authtoken',\n    'rest_framework',\n    'rest_framework_docs',\n    'rest_framework_expiring_authtoken',\n    'drf_yasg',\n]\n\nINSTALLED_APPS = DEFAULT_APPS + OUR_APPS + THIRD_PARTY_APPS\n\nMIDDLEWARE = [\n    'corsheaders.middleware.CorsMiddleware',\n    'django.middleware.security.SecurityMiddleware',\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.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'evalai.urls'\n\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\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 = 'evalai.wsgi.application'\n\n\n# Password validation\n# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',  # noqa\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',  # noqa\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',  # noqa\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',  # noqa\n    },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.10/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.10/howto/static-files/\n\nSTATIC_URL = '/static/'\nSTATIC_ROOT = os.path.join(BASE_DIR, 'static')\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\nMEDIA_URL = \"/media/\"\n\nSITE_ID = 1\n\nREST_FRAMEWORK = {\n    'DEFAULT_PAGINATION_CLASS': (\n        'rest_framework.pagination.LimitOffsetPagination'),\n    'PAGE_SIZE': 10,\n    'DEFAULT_PERMISSION_CLASSES': [\n        'rest_framework.permissions.IsAuthenticatedOrReadOnly'\n    ],\n    'DEFAULT_AUTHENTICATION_CLASSES': [\n        'rest_framework_expiring_authtoken.authentication.ExpiringTokenAuthentication',\n    ],\n    'TEST_REQUEST_DEFAULT_FORMAT': 'json',\n    'DEFAULT_THROTTLE_CLASSES': (\n        'rest_framework.throttling.AnonRateThrottle',\n        'rest_framework.throttling.UserRateThrottle'\n    ),\n    'DEFAULT_THROTTLE_RATES': {\n        'anon': '100/minute',\n        'user': '100/minute'\n    },\n    'DEFAULT_RENDERER_CLASSES': (\n        'rest_framework.renderers.JSONRenderer',\n    )\n}\n\n# ALLAUTH SETTINGS\nACCOUNT_EMAIL_REQUIRED = True\nOLD_PASSWORD_FIELD_ENABLED = True\nACCOUNT_CONFIRM_EMAIL_ON_GET = True\nACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = '/api/auth/email-confirmed/'\nACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = '/api/auth/email-confirmed/'\n\nAUTHENTICATION_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# CORS Settings\nCORS_ORIGIN_ALLOW_ALL = True\n\n# REST Framework Expiring Tokens Configuration\nEXPIRING_TOKEN_LIFESPAN = datetime.timedelta(days=7)\n\n# Logging\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'root': {\n        'level': 'INFO',\n        'handlers': ['console'],\n    },\n    'filters': {\n        'require_debug_false': {\n            '()': 'django.utils.log.RequireDebugFalse',\n        },\n        'require_debug_true': {\n            '()': 'django.utils.log.RequireDebugTrue',\n        }\n    },\n    'formatters': {\n        'simple': {\n            'format': '[%(asctime)s] %(levelname)s %(message)s',\n            'datefmt': '%Y-%m-%d %H:%M:%S'\n        },\n        'verbose': {\n            'format': '[%(asctime)s] %(levelname)s %(module)s %(message)s',\n            'datefmt': '%Y-%m-%d %H:%M:%S'\n        }\n    },\n    'handlers': {\n        'console': {\n            'level': 'INFO',\n            'filters': ['require_debug_true'],\n            'class': 'logging.StreamHandler',\n            'formatter': 'simple'\n        },\n        'logfile': {\n            'level': 'DEBUG',\n            'class': 'logging.handlers.RotatingFileHandler',\n            'filename': os.path.join(BASE_DIR, 'django.log'),\n            'maxBytes': 50000,\n            'backupCount': 10,\n            'formatter': 'verbose'\n        },\n        'mail_admins': {\n            'level': 'ERROR',\n            'class': 'django.utils.log.AdminEmailHandler',\n            'filters': ['require_debug_false'],\n        }\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['console'],\n            'propagate': False,\n        },\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': False,\n        },\n        'django.security': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': False,\n        },\n        'django.db.backends': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': False,\n        }\n    }\n}\n\nCACHES = {\n    'default': {\n        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n    }\n}\n\nRABBITMQ_PARAMETERS = {\n    'HOST': os.environ.get(\"RABBITMQ_HOST\", 'localhost'),\n    'EVALAI_EXCHANGE': {\n        'NAME': 'evalai_submissions',\n        'TYPE': 'topic',\n    },\n    'SUBMISSION_QUEUE': 'submission_task_queue',\n}\n\n# The maximum size in bytes for request body\n# https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size\nFILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB\nDATA_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB\n\n# To make usermame field read-only, customized serializer is defined.\nREST_AUTH_SERIALIZERS = {\n    'USER_DETAILS_SERIALIZER': 'accounts.serializers.ProfileSerializer',\n}\n\n# For inviting users to participant and host teams.\nADMIN_EMAIL = \"admin@cloudcv.org\"\nCLOUDCV_TEAM_EMAIL = \"EvalAI Team <team@cloudcv.org>\"\n\nSWAGGER_SETTINGS = {\n    'DEFAULT_INFO': 'evalai.urls.swagger_api_info',\n    'SECURITY_DEFINITIONS': {\n        'Token Authentication': {\n            'type': 'apiKey',\n            'name': 'Authorization',\n            'in': 'header'\n        },\n    }\n}\n\nREDOC_SETTINGS = {\n    'SPEC_URL': ('docs.yaml', {'format': '.yaml'}),\n}\n", "path": "settings/common.py"}], "after_files": [{"content": "\"\"\"\nDjango settings for evalai project.\n\nGenerated by 'django-admin startproject' using Django 1.10.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.10/ref/settings/\n\"\"\"\n\nimport datetime\nimport os\nimport sys\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nAPPS_DIR = os.path.join(BASE_DIR, 'apps')\n\nsys.path.append(APPS_DIR)\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os.environ.get('SECRET_KEY', 'random_secret_key')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nTEST = False\n\nALLOWED_HOSTS = []\n\n\n# Application definition\n\nDEFAULT_APPS = [\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.contrib.sites',\n]\n\nOUR_APPS = [\n    'accounts',\n    'analytics',\n    'base',\n    'challenges',\n    'hosts',\n    'jobs',\n    'participants',\n    'web',\n]\n\nTHIRD_PARTY_APPS = [\n    'allauth',\n    'allauth.account',\n    'corsheaders',\n    'django_ses',\n    'import_export',\n    'rest_auth',\n    'rest_auth.registration',\n    'rest_framework.authtoken',\n    'rest_framework',\n    'rest_framework_docs',\n    'rest_framework_expiring_authtoken',\n    'drf_yasg',\n]\n\nINSTALLED_APPS = DEFAULT_APPS + OUR_APPS + THIRD_PARTY_APPS\n\nMIDDLEWARE = [\n    'corsheaders.middleware.CorsMiddleware',\n    'django.middleware.security.SecurityMiddleware',\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.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'evalai.urls'\n\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\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 = 'evalai.wsgi.application'\n\n\n# Password validation\n# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',  # noqa\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',  # noqa\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',  # noqa\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',  # noqa\n    },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.10/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.10/howto/static-files/\n\nSTATIC_URL = '/static/'\nSTATIC_ROOT = os.path.join(BASE_DIR, 'static')\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\nMEDIA_URL = \"/media/\"\n\nSITE_ID = 1\n\nREST_FRAMEWORK = {\n    'DEFAULT_PAGINATION_CLASS': (\n        'rest_framework.pagination.LimitOffsetPagination'),\n    'PAGE_SIZE': 10,\n    'DEFAULT_PERMISSION_CLASSES': [\n        'rest_framework.permissions.IsAuthenticatedOrReadOnly'\n    ],\n    'DEFAULT_AUTHENTICATION_CLASSES': [\n        'rest_framework_expiring_authtoken.authentication.ExpiringTokenAuthentication',\n    ],\n    'TEST_REQUEST_DEFAULT_FORMAT': 'json',\n    'DEFAULT_THROTTLE_CLASSES': (\n        'rest_framework.throttling.AnonRateThrottle',\n        'rest_framework.throttling.UserRateThrottle'\n    ),\n    'DEFAULT_THROTTLE_RATES': {\n        'anon': '100/minute',\n        'user': '100/minute'\n    },\n    'DEFAULT_RENDERER_CLASSES': (\n        'rest_framework.renderers.JSONRenderer',\n    )\n}\n\n# ALLAUTH SETTINGS\nACCOUNT_EMAIL_REQUIRED = True\nOLD_PASSWORD_FIELD_ENABLED = True\nACCOUNT_CONFIRM_EMAIL_ON_GET = True\nACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = '/api/auth/email-confirmed/'\nACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = '/api/auth/email-confirmed/'\n\nAUTHENTICATION_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# CORS Settings\nCORS_ORIGIN_ALLOW_ALL = True\n\n# REST Framework Expiring Tokens Configuration\nEXPIRING_TOKEN_LIFESPAN = datetime.timedelta(days=7)\n\n# Logging\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'root': {\n        'level': 'INFO',\n        'handlers': ['console'],\n    },\n    'filters': {\n        'require_debug_false': {\n            '()': 'django.utils.log.RequireDebugFalse',\n        },\n        'require_debug_true': {\n            '()': 'django.utils.log.RequireDebugTrue',\n        }\n    },\n    'formatters': {\n        'simple': {\n            'format': '[%(asctime)s] %(levelname)s %(message)s',\n            'datefmt': '%Y-%m-%d %H:%M:%S'\n        },\n        'verbose': {\n            'format': '[%(asctime)s] %(levelname)s %(module)s %(message)s',\n            'datefmt': '%Y-%m-%d %H:%M:%S'\n        }\n    },\n    'handlers': {\n        'console': {\n            'level': 'INFO',\n            'filters': ['require_debug_true'],\n            'class': 'logging.StreamHandler',\n            'formatter': 'simple'\n        },\n        'logfile': {\n            'level': 'DEBUG',\n            'class': 'logging.handlers.RotatingFileHandler',\n            'filename': os.path.join(BASE_DIR, 'django.log'),\n            'maxBytes': 50000,\n            'backupCount': 10,\n            'formatter': 'verbose'\n        },\n        'mail_admins': {\n            'level': 'ERROR',\n            'class': 'django.utils.log.AdminEmailHandler',\n            'filters': ['require_debug_false'],\n        }\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['console'],\n            'propagate': False,\n        },\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': False,\n        },\n        'django.security': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': False,\n        },\n        'django.db.backends': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': False,\n        }\n    }\n}\n\nCACHES = {\n    'default': {\n        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n    }\n}\n\n# The maximum size in bytes for request body\n# https://docs.djangoproject.com/en/1.10/ref/settings/#data-upload-max-memory-size\nFILE_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB\nDATA_UPLOAD_MAX_MEMORY_SIZE = 524288000  # 500 MB\n\n# To make usermame field read-only, customized serializer is defined.\nREST_AUTH_SERIALIZERS = {\n    'USER_DETAILS_SERIALIZER': 'accounts.serializers.ProfileSerializer',\n}\n\n# For inviting users to participant and host teams.\nADMIN_EMAIL = \"admin@cloudcv.org\"\nCLOUDCV_TEAM_EMAIL = \"EvalAI Team <team@cloudcv.org>\"\n\nSWAGGER_SETTINGS = {\n    'DEFAULT_INFO': 'evalai.urls.swagger_api_info',\n    'SECURITY_DEFINITIONS': {\n        'Token Authentication': {\n            'type': 'apiKey',\n            'name': 'Authorization',\n            'in': 'header'\n        },\n    }\n}\n\nREDOC_SETTINGS = {\n    'SPEC_URL': ('docs.yaml', {'format': '.yaml'}),\n}\n", "path": "settings/common.py"}]}