Ticket #24624: settings.2.py

File settings.2.py, 1.1 KB (added by Scott Sanders, 10 years ago)

This is my common settings.py that imports the other file for dev purposes

Line 
1import os
2
3BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
4
5
6DEBUG = True
7
8MAIN_INSTALLED_APPS = [
9 'django.contrib.admin',
10 'django.contrib.auth',
11 'django.contrib.contenttypes',
12 'django.contrib.sessions',
13 'django.contrib.messages',
14 'django.contrib.staticfiles',
15 'client',
16]
17
18MAIN_MIDDLEWARE_CLASSES = [
19 'django.contrib.sessions.middleware.SessionMiddleware',
20 'django.middleware.common.CommonMiddleware',
21 'django.middleware.csrf.CsrfViewMiddleware',
22 'django.contrib.auth.middleware.AuthenticationMiddleware',
23 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
24 'django.contrib.messages.middleware.MessageMiddleware',
25 'django.middleware.clickjacking.XFrameOptionsMiddleware',
26 'django.middleware.security.SecurityMiddleware',
27]
28
29if DEBUG:
30 from chi.dev.settings import *
31else:
32 from chi.prod.settings import *
33
34INSTALLED_APPS = MAIN_INSTALLED_APPS + MORE_INSTALLED_APPS
35MIDDLEWARE_CLASSES = MAIN_MIDDLEWARE_CLASSES + MORE_MIDDLEWARE_CLASSES
36
37WSGI_APPLICATION = 'chi.wsgi.application'
Back to Top