Source

django-template-project / source / settings / main_settings.py

Full commit
#!/usr/bin/python
# -*- coding: UTF-8 -*-

# Django settings for project.
import os
import sys

# Debug settings
DEBUG = False
TEMPLATE_DEBUG = DEBUG

# Force removal of fastcgi script name from URL
FORCE_SCRIPT_NAME=""

# We are in "project/trunk/code/" folder. We need to get PROJECT_ROOT
PROJECT_ROOT = os.path.abspath('..')

sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_ROOT, 'source/')))
sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_ROOT, 'source/apps')))
sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_ROOT, 'source/apps/ext')))
sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_ROOT, 'source/lib')))
sys.path.insert(0, os.path.abspath(os.path.join(PROJECT_ROOT, 'source/lib/ext')))

ADMINS = [
     ('Alerts', 'alert@example.com'),
]
MANAGERS = [
     ('Info', 'info@example.com'),
]
if not DEBUG:
    pass

EMAIL_HOST = ''
EMAIL_PORT = ''
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = True
EMAIL_SUBJECT_PREFIX = ' '


# DB settings will be overrided
#DATABASES = {
#    'default': {}
#}

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'Europe/Kiev'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en'

#LANGUAGES = (
#             ('ru', u'Русский'),
#             ('en', u'English'),
#             ('uk', u'Український'),
#             )
#

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
USE_L10N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, "media")

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/media/'

STATIC_ROOT = os.path.join(PROJECT_ROOT, "static")

STATIC_URL = '/static/'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/adminmedia/'
ADMIN_MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'adminmedia') 

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)


# Make this unique, and don't share it with anybody.
SECRET_KEY = 'c^7$)t^ka7oe+z6nfw)#$10auo=_$5oqv%6@nhhzm%k5s$1mxr'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
)

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
    # We don't use global template dirs
)

# Default list of context processors
TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'django.contrib.messages.context_processors.messages',
    'django.core.context_processors.request',

)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.staticfiles',
    'django.contrib.admin',

    'jquery',
)

INTERNAL_IPS = ('127.0.0.1', 'localhost', 'django.local')