settings: added local_settings.
Signed-off-by: rscnt <rascnt@gmail.com>
This commit is contained in:
parent
e280d3213c
commit
a1c97d96ce
3 changed files with 21 additions and 5 deletions
0
dynamicweb/local/__init__.py
Normal file
0
dynamicweb/local/__init__.py
Normal file
13
dynamicweb/local/local_settings.py.example
Normal file
13
dynamicweb/local/local_settings.py.example
Normal file
|
@ -0,0 +1,13 @@
|
|||
from settings import SITE_ROOT
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'db_name',
|
||||
'USER': 'username',
|
||||
'PASSWORD': 'password',
|
||||
}
|
||||
}
|
|
@ -10,12 +10,14 @@ For the full list of settings and their values, see
|
|||
https://docs.djangoproject.com/en/1.8/ref/settings/
|
||||
"""
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
import django.db.backends.postgresql_psycopg2
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
gettext = lambda s: s
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
|
||||
|
@ -106,7 +108,8 @@ STATIC_URL = '/static/'
|
|||
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||
|
||||
|
||||
try:
|
||||
from .settings_local import *
|
||||
except ImportError as e:
|
||||
pass
|
||||
from local.local_settings import * # noqa
|
||||
except ImportError:
|
||||
logging.warning("No local_settings file found.")
|
||||
|
|
Loading…
Reference in a new issue