74 lines
2.2 KiB
Python
74 lines
2.2 KiB
Python
|
try:
|
||
|
from local_settings import *
|
||
|
except:
|
||
|
DEBUG = True
|
||
|
DATABASES = {
|
||
|
'default': {
|
||
|
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
||
|
'NAME': 'tyrellogbook', # Or path to database file if using sqlite3.
|
||
|
'USER': '', # Not used with sqlite3.
|
||
|
'PASSWORD': '', # Not used with sqlite3.
|
||
|
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
|
||
|
'PORT': '', # Set to empty string for default. Not used with sqlite3.
|
||
|
}
|
||
|
}
|
||
|
|
||
|
# Django settings for flight project.
|
||
|
import os
|
||
|
|
||
|
TEMPLATE_DEBUG = DEBUG
|
||
|
|
||
|
ADMINS = (
|
||
|
# ('Your Name', 'your_email@domain.com'),
|
||
|
)
|
||
|
|
||
|
MANAGERS = ADMINS
|
||
|
|
||
|
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
|
||
|
TIME_ZONE = 'America/New_York'
|
||
|
LANGUAGE_CODE = 'en-us'
|
||
|
SITE_ID = 1
|
||
|
USE_I18N = True
|
||
|
USE_L10N = True
|
||
|
MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'public/media/')
|
||
|
MEDIA_URL = '/media/'
|
||
|
ADMIN_MEDIA_PREFIX = '/media/'
|
||
|
SECRET_KEY = '-u2an)@echbftmxy&2=(0uv(2h465fwq0x+k1%(+exvt@zr!z*'
|
||
|
|
||
|
TEMPLATE_LOADERS = (
|
||
|
'django.template.loaders.filesystem.Loader',
|
||
|
'django.template.loaders.app_directories.Loader',
|
||
|
# 'django.template.loaders.eggs.Loader',
|
||
|
)
|
||
|
|
||
|
MIDDLEWARE_CLASSES = (
|
||
|
'django.middleware.common.CommonMiddleware',
|
||
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||
|
)
|
||
|
|
||
|
ROOT_URLCONF = 'flight.urls'
|
||
|
|
||
|
TEMPLATE_DIRS = (
|
||
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||
|
# Always use forward slashes, even on Windows.
|
||
|
# Don't forget to use absolute paths, not relative paths.
|
||
|
os.path.join(os.path.dirname(__file__),'templates')
|
||
|
|
||
|
)
|
||
|
|
||
|
INSTALLED_APPS = (
|
||
|
'django.contrib.admin',
|
||
|
'django.contrib.auth',
|
||
|
'django.contrib.contenttypes',
|
||
|
'django.contrib.sessions',
|
||
|
'django.contrib.sites',
|
||
|
'django.contrib.messages',
|
||
|
# Uncomment the next line to enable the admin:
|
||
|
'django.contrib.admin',
|
||
|
'flight.logbook',
|
||
|
)
|
||
|
LOGIN_URL="/admin/"
|