Zmena rozlisovani nastaveni
* Bez prepisovani * Mozna pochrouma push_* pred deployem
This commit is contained in:
parent
f8b52d4a88
commit
bb975e0eb2
4 changed files with 74 additions and 25 deletions
|
@ -1,30 +1,20 @@
|
||||||
import os.path
|
import os.path
|
||||||
from .settings_common import *
|
|
||||||
|
|
||||||
# Local development settings
|
#
|
||||||
|
# "Chytre" rozliseni, zda je toto produkcni, testovaci ci
|
||||||
|
# jina/vyvojova/lokalni instance.
|
||||||
|
#
|
||||||
|
# Je mozne tez rozhodnout primo pomoci:
|
||||||
|
# DJANGO_SETTINGS_MODULE=mamweb.settings_ZZZ ./manage.py ...
|
||||||
|
#
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
if os.path.abspath(__file__).startswith('/akce/MaM/WWW/mamweb-test/'):
|
||||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
from .settings_test import *
|
||||||
|
|
||||||
INSTALLED_APPS += (
|
elif os.path.abspath(__file__).startswith('/akce/MaM/WWW/mamweb/'):
|
||||||
'debug_toolbar',
|
from .settings_prod import *
|
||||||
'django_extensions',
|
|
||||||
)
|
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
else:
|
||||||
DEBUG = True
|
from .settings_local import *
|
||||||
|
|
||||||
TEMPLATE_DEBUG = True
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['127.0.0.1']
|
|
||||||
|
|
||||||
# Database
|
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
'NAME': os.path.join(BASE_DIR, 'db-local.sqlite3'),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
38
mamweb/settings_local.py
Normal file
38
mamweb/settings_local.py
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
#
|
||||||
|
# Lokalni / vyvojove nastaveni settings.py
|
||||||
|
#
|
||||||
|
# Pro vyber tohoto nastaveni muzete pouzit tez:
|
||||||
|
# DJANGO_SETTINGS_MODULE=mamweb.settings_local ./manage.py ...
|
||||||
|
#
|
||||||
|
|
||||||
|
# Import common settings
|
||||||
|
from .settings_common import *
|
||||||
|
|
||||||
|
|
||||||
|
# Quick-start development settings - unsuitable for production
|
||||||
|
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||||
|
|
||||||
|
INSTALLED_APPS += (
|
||||||
|
'debug_toolbar',
|
||||||
|
'django_extensions',
|
||||||
|
)
|
||||||
|
|
||||||
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
|
DEBUG = True
|
||||||
|
|
||||||
|
TEMPLATE_DEBUG = True
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = ['127.0.0.1']
|
||||||
|
|
||||||
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': os.path.join(BASE_DIR, 'db-local.sqlite3'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
#
|
||||||
|
# Produkcni nastaveni settings.py
|
||||||
|
#
|
||||||
|
# Pro vyber tohoto nastaveni muzete pouzit tez:
|
||||||
|
# DJANGO_SETTINGS_MODULE=mamweb.settings_prod ./manage.py ...
|
||||||
|
#
|
||||||
|
|
||||||
|
# Import common settings
|
||||||
from .settings_common import *
|
from .settings_common import *
|
||||||
|
|
||||||
# Specific settings for remote production
|
|
||||||
|
|
||||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
#
|
||||||
|
# Testovaci nastaveni settings.py (testovani na atreyi)
|
||||||
|
#
|
||||||
|
# Pro vyber tohoto nastaveni muzete pouzit tez:
|
||||||
|
# DJANGO_SETTINGS_MODULE=mamweb.settings_test ./manage.py ...
|
||||||
|
#
|
||||||
|
|
||||||
|
# Import common settings
|
||||||
from .settings_common import *
|
from .settings_common import *
|
||||||
|
|
||||||
# Specific settings for remote test site
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||||
|
|
Loading…
Reference in a new issue