Created
November 8, 2017 11:07
-
-
Save elcolie/97be2452a556ac0e49f66499e6112cc2 to your computer and use it in GitHub Desktop.
Local development config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .base import * | |
# Secret key doesn't matter in local development | |
SECRET_KEY = 'some-keys' | |
# Debug mode | |
DEBUG = True | |
INTERNAL_IPS = ['127.0.0.1', '0.0.0.0'] | |
# Allowed from all host | |
ALLOWED_HOSTS = ['*'] | |
# App specifically for development | |
INSTALLED_APPS += [ | |
'debug_toolbar', | |
] | |
# Middleware for development | |
MIDDLEWARE += [ | |
'debug_toolbar.middleware.DebugToolbarMiddleware', | |
] | |
# Database configuration | |
DATABASES = { | |
'default': env.db("DATABASE_URL", default="postgres://postgres:postgres@localhost:5432/poinkdb") | |
} | |
DATABASES['default']['ATOMIC_REQUESTS'] = True | |
# Django REST Framework Cors Header Origin | |
CORS_ORIGIN_ALLOW_ALL = True | |
# Static files | |
STATIC_ROOT = str(ROOT_DIR('static')) | |
STATIC_URL = '/static/' | |
STATICFILES_DIRS = ( | |
str(ROOT_DIR.path('static_files')), | |
) | |
STATICFILES_FINDERS = ( | |
'django.contrib.staticfiles.finders.FileSystemFinder', | |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
) | |
DEBUG_TOOLBAR_PANELS = [ | |
'debug_toolbar.panels.versions.VersionsPanel', | |
'debug_toolbar.panels.timer.TimerPanel', | |
'debug_toolbar.panels.settings.SettingsPanel', | |
'debug_toolbar.panels.headers.HeadersPanel', | |
'debug_toolbar.panels.request.RequestPanel', | |
'debug_toolbar.panels.sql.SQLPanel', | |
'debug_toolbar.panels.staticfiles.StaticFilesPanel', | |
'debug_toolbar.panels.templates.TemplatesPanel', | |
'debug_toolbar.panels.cache.CachePanel', | |
'debug_toolbar.panels.signals.SignalsPanel', | |
'debug_toolbar.panels.logging.LoggingPanel', | |
'debug_toolbar.panels.redirects.RedirectsPanel', | |
] | |
# Media files | |
MEDIA_ROOT = str(ROOT_DIR('media')) | |
MEDIA_URL = '/media/' | |
# Because SECRET_KEY is base on local.py | |
JWT_AUTH['JWT_SECRET_KEY'] = SECRET_KEY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment