Browse Source

Allow CORS.

feature/python-error-tracking
Drew Larson 8 years ago
parent
commit
eb419e7e96
  1. 15
      bikeshop_project/bikeshop/settings/development.py
  2. 1
      requirements/development.txt

15
bikeshop_project/bikeshop/settings/development.py

@ -49,13 +49,20 @@ LOGGING = {
}, },
} }
# INSTALLED_APPS += [ INSTALLED_APPS += [
# 'debug_toolbar' 'corsheaders',
# ] # 'debug_toolbar'
]
MIDDLEWARE_CLASSES.insert(0, 'django.middleware.common.CommonMiddleware')
# MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware'] # MIDDLEWARE_CLASSES += [
# 'debug_toolbar.middleware.DebugToolbarMiddleware'
# ]
# Don't worry about IP addresses, just show the toolbar. # Don't worry about IP addresses, just show the toolbar.
DEBUG_TOOLBAR_CONFIG = { DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': lambda *args: True 'SHOW_TOOLBAR_CALLBACK': lambda *args: True
} }
CORS_ORIGIN_ALLOW_ALL = True

1
requirements/development.txt

@ -1,3 +1,4 @@
-r base.txt -r base.txt
-r testing.txt -r testing.txt
django-debug-toolbar django-debug-toolbar
django-cors-headers

Loading…
Cancel
Save