We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Set default renderer to JSONRenderer in DRF backend
For reference: http://www.django-rest-framework.org/api-guide/renderers/#setting-the-renderers

--- 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 ALLOWED_HOSTS = []
33 
34 
35 # Application definition
36 
37 DEFAULT_APPS = [
38     'django.contrib.admin',
39     'django.contrib.auth',
40     'django.contrib.contenttypes',
41     'django.contrib.sessions',
42     'django.contrib.messages',
43     'django.contrib.staticfiles',
44     'django.contrib.sites',
45 ]
46 
47 OUR_APPS = [
48     'accounts',
49     'analytics',
50     'base',
51     'challenges',
52     'hosts',
53     'jobs',
54     'participants',
55     'submissions',
56     'web',
57 ]
58 
59 THIRD_PARTY_APPS = [
60     'allauth',
61     'allauth.account',
62     'corsheaders',
63     'rest_auth',
64     'rest_auth.registration',
65     'rest_framework.authtoken',
66     'rest_framework',
67     'rest_framework_docs',
68     'rest_framework_expiring_authtoken',
69 ]
70 
71 INSTALLED_APPS = DEFAULT_APPS + OUR_APPS + THIRD_PARTY_APPS
72 
73 MIDDLEWARE = [
74     'corsheaders.middleware.CorsMiddleware',
75     'django.middleware.security.SecurityMiddleware',
76     'django.contrib.sessions.middleware.SessionMiddleware',
77     'django.middleware.common.CommonMiddleware',
78     'django.middleware.csrf.CsrfViewMiddleware',
79     'django.contrib.auth.middleware.AuthenticationMiddleware',
80     'django.contrib.messages.middleware.MessageMiddleware',
81     'django.middleware.clickjacking.XFrameOptionsMiddleware',
82 ]
83 
84 ROOT_URLCONF = 'evalai.urls'
85 
86 
87 TEMPLATES = [
88     {
89         'BACKEND': 'django.template.backends.django.DjangoTemplates',
90         'DIRS': [],
91         'APP_DIRS': True,
92         'OPTIONS': {
93             'context_processors': [
94                 'django.template.context_processors.debug',
95                 'django.template.context_processors.request',
96                 'django.contrib.auth.context_processors.auth',
97                 'django.contrib.messages.context_processors.messages',
98             ],
99         },
100     },
101 ]
102 
103 WSGI_APPLICATION = 'evalai.wsgi.application'
104 
105 
106 # Password validation
107 # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
108 
109 AUTH_PASSWORD_VALIDATORS = [
110     {
111         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',  # noqa
112     },
113     {
114         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',  # noqa
115     },
116     {
117         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',  # noqa
118     },
119     {
120         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',  # noqa
121     },
122 ]
123 
124 
125 # Internationalization
126 # https://docs.djangoproject.com/en/1.10/topics/i18n/
127 
128 LANGUAGE_CODE = 'en-us'
129 
130 TIME_ZONE = 'UTC'
131 
132 USE_I18N = True
133 
134 USE_L10N = True
135 
136 USE_TZ = True
137 
138 # Static files (CSS, JavaScript, Images)
139 # https://docs.djangoproject.com/en/1.10/howto/static-files/
140 
141 STATIC_URL = '/static/'
142 
143 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
144 MEDIA_URL = "/media/"
145 
146 SITE_ID = 1
147 
148 REST_FRAMEWORK = {
149     'DEFAULT_PAGINATION_CLASS': (
150         'rest_framework.pagination.LimitOffsetPagination'),
151     'PAGE_SIZE': 10,
152     'DEFAULT_PERMISSION_CLASSES': [
153         'rest_framework.permissions.IsAuthenticatedOrReadOnly'
154     ],
155     'DEFAULT_AUTHENTICATION_CLASSES': [
156         'rest_framework_expiring_authtoken.authentication.ExpiringTokenAuthentication',
157     ],
158     'TEST_REQUEST_DEFAULT_FORMAT': 'json',
159     'DEFAULT_THROTTLE_CLASSES': (
160         'rest_framework.throttling.AnonRateThrottle',
161         'rest_framework.throttling.UserRateThrottle'
162     ),
163     'DEFAULT_THROTTLE_RATES': {
164         'anon': '100/minute',
165         'user': '100/minute'
166     }
167 }
168 
169 # ALLAUTH SETTINGS
170 ACCOUNT_EMAIL_REQUIRED = True
171 OLD_PASSWORD_FIELD_ENABLED = True
172 
173 AUTHENTICATION_BACKENDS = (
174     # Needed to login by username in Django admin, regardless of `allauth`
175     'django.contrib.auth.backends.ModelBackend',
176     # `allauth` specific authentication methods, such as login by e-mail
177     'allauth.account.auth_backends.AuthenticationBackend',
178 )
179 
180 # CORS Settings
181 CORS_ORIGIN_ALLOW_ALL = True
182 
183 # REST Framework Expiring Tokens Configuration
184 EXPIRING_TOKEN_LIFESPAN = datetime.timedelta(days=7)
185 
186 # Logging
187 LOGGING = {
188     'version': 1,
189     'disable_existing_loggers': False,
190     'root': {
191         'level': 'INFO',
192         'handlers': ['console'],
193     },
194     'filters': {
195         'require_debug_false': {
196             '()': 'django.utils.log.RequireDebugFalse',
197         },
198         'require_debug_true': {
199             '()': 'django.utils.log.RequireDebugTrue',
200         }
201     },
202     'formatters': {
203         'simple': {
204             'format': '[%(asctime)s] %(levelname)s %(message)s',
205             'datefmt': '%Y-%m-%d %H:%M:%S'
206         },
207         'verbose': {
208             'format': '[%(asctime)s] %(levelname)s %(module)s %(message)s',
209             'datefmt': '%Y-%m-%d %H:%M:%S'
210         }
211     },
212     'handlers': {
213         'console': {
214             'level': 'INFO',
215             'filters': ['require_debug_true'],
216             'class': 'logging.StreamHandler',
217             'formatter': 'simple'
218         },
219         'logfile': {
220             'level': 'DEBUG',
221             'class': 'logging.handlers.RotatingFileHandler',
222             'filename': "/tmp/logfile",
223             'maxBytes': 50000,
224             'backupCount': 10,
225             'formatter': 'verbose'
226         },
227         'mail_admins': {
228             'level': 'ERROR',
229             'class': 'django.utils.log.AdminEmailHandler',
230             'filters': ['require_debug_false'],
231         }
232     },
233     'loggers': {
234         'django': {
235             'handlers': ['console'],
236             'propagate': True,
237         },
238         'django.request': {
239             'handlers': ['mail_admins'],
240             'level': 'ERROR',
241             'propagate': False,
242         },
243         'django.security': {
244             'handlers': ['mail_admins'],
245             'level': 'ERROR',
246             'propagate': False,
247         },
248         'django.db.backends': {
249             'handlers': ['mail_admins'],
250             'level': 'ERROR',
251             'propagate': False,
252         }
253     }
254 }
255 
256 CACHES = {
257     'default': {
258         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
259     }
260 }
261
```
--- 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
@@ -163,7 +163,10 @@
     'DEFAULT_THROTTLE_RATES': {
         'anon': '100/minute',
         'user': '100/minute'
-    }
+    },
+    'DEFAULT_RENDERER_CLASSES': (
+        'rest_framework.renderers.JSONRenderer',
+    )
 }
 
 # ALLAUTH SETTINGS

{"golden_diff": "diff --git a/settings/common.py b/settings/common.py\n--- a/settings/common.py\n+++ b/settings/common.py\n@@ -163,7 +163,10 @@\n     'DEFAULT_THROTTLE_RATES': {\n         'anon': '100/minute',\n         'user': '100/minute'\n-    }\n+    },\n+    'DEFAULT_RENDERER_CLASSES': (\n+        'rest_framework.renderers.JSONRenderer',\n+    )\n }\n \n # ALLAUTH SETTINGS\n", "issue": "Set default renderer to JSONRenderer in DRF backend\nFor reference: http://www.django-rest-framework.org/api-guide/renderers/#setting-the-renderers\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\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    'submissions',\n    'web',\n]\n\nTHIRD_PARTY_APPS = [\n    'allauth',\n    'allauth.account',\n    'corsheaders',\n    'rest_auth',\n    'rest_auth.registration',\n    'rest_framework.authtoken',\n    'rest_framework',\n    'rest_framework_docs',\n    'rest_framework_expiring_authtoken',\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/'\n\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}\n\n# ALLAUTH SETTINGS\nACCOUNT_EMAIL_REQUIRED = True\nOLD_PASSWORD_FIELD_ENABLED = True\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': \"/tmp/logfile\",\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': True,\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", "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\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    'submissions',\n    'web',\n]\n\nTHIRD_PARTY_APPS = [\n    'allauth',\n    'allauth.account',\n    'corsheaders',\n    'rest_auth',\n    'rest_auth.registration',\n    'rest_framework.authtoken',\n    'rest_framework',\n    'rest_framework_docs',\n    'rest_framework_expiring_authtoken',\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/'\n\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\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': \"/tmp/logfile\",\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': True,\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", "path": "settings/common.py"}]}