snipt/settings.py

99 lines
2.2 KiB
Python
Raw Normal View History

2011-06-01 21:50:18 -07:00
import os.path
BASE_PATH = os.path.dirname(__file__)
ADMINS = (
('Nick Sergeant', 'nick@snipt.net'),
)
MANAGERS = ADMINS
INTERNAL_IPS = ('127.0.0.1',)
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/login/'
LOGOUT_URL = '/logout/'
TIME_ZONE = 'America/New_York'
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
USE_I18N = True
MEDIA_ROOT = os.path.join(BASE_PATH, 'media')
MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/media/admin/'
SESSION_COOKIE_AGE = 31556926
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.request',
)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
)
MIDDLEWARE_CLASSES = (
2011-10-01 16:09:59 -07:00
'django.middleware.cache.CacheMiddleware',
2011-06-01 21:50:18 -07:00
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
2011-10-12 08:29:21 -07:00
'pagination.middleware.PaginationMiddleware',
2011-06-01 21:50:18 -07:00
)
ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = os.path.join(BASE_PATH, 'templates')
INSTALLED_APPS = (
'grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.redirects',
'compressor',
'django_bcrypt',
'south',
2011-10-12 08:29:21 -07:00
'pagination',
2011-06-05 09:51:56 -07:00
'taggit',
2011-10-01 10:23:05 -07:00
'tastypie',
'snipts',
2011-06-01 21:50:18 -07:00
)
# CSS compression
COMPRESS_OUTPUT_DIR = "cache"
COMPILER_FORMATS = {
'.less': {
'binary_path':'lessc',
'arguments': '*.less *.css'
},
}
# Grappelli
GRAPPELLI_ADMIN_TITLE = '<a href="/">Snipt</a>'
2011-10-02 15:38:20 -07:00
# User absolute URLs
ABSOLUTE_URL_OVERRIDES = {
'auth.user': lambda u: "/%s/" % u.username,
}
2011-06-01 21:50:18 -07:00
# Local settings and debug
from local_settings import *
if DEBUG:
INSTALLED_APPS += ('django_extensions',)