Created
April 4, 2019 21:17
-
-
Save alexryabtsev/8acdbe71c83aca23206f81c1cbb7dd03 to your computer and use it in GitHub Desktop.
This file contains 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
import environ | |
root = environ.Path(__file__) - 3 # get root of the project | |
env = environ.Env() | |
environ.Env.read_env() # reading .env file | |
SITE_ROOT = root() | |
DEBUG = env.bool('DEBUG', default=False) | |
TEMPLATE_DEBUG = DEBUG | |
DATABASES = {'default': env.db('DATABASE_URL')} | |
public_root = root.path('public/') | |
MEDIA_ROOT = public_root('media') | |
MEDIA_URL = env.str('MEDIA_URL', default='media/') | |
STATIC_ROOT = public_root('static') | |
STATIC_URL = env.str('STATIC_URL', default='static/') | |
SECRET_KEY = env.str('SECRET_KEY') | |
CACHES = {'default': env.cache('REDIS_CACHE_URL')} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment