2 # Django settings for lanai project.
8 ADMIN_MEDIA_PREFIX = '/admin_media/'
9 SECRET_KEY = '$oo^&_m&qwbib=(_4m_n*zn-d=g#s0he5fx9xonnym#8p6yigm'
10 # List of callables that know how to import templates from various sources.
12 'django.template.loaders.filesystem.load_template_source',
13 'django.template.loaders.app_directories.load_template_source',
14 'forum.modules.module_templates_loader',
15 'forum.skins.load_template_source',
16 # 'django.template.loaders.eggs.load_template_source',
19 MIDDLEWARE_CLASSES = [
20 #'django.middleware.gzip.GZipMiddleware',
21 'django.contrib.sessions.middleware.SessionMiddleware',
22 #'django.middleware.locale.LocaleMiddleware',
23 #'django.middleware.cache.UpdateCacheMiddleware',
24 'django.middleware.common.CommonMiddleware',
25 #'django.middleware.cache.FetchFromCacheMiddleware',
26 'forum.middleware.extended_user.ExtendedUser',
27 #'django.middleware.sqlprint.SqlPrintingMiddleware',
28 'forum.middleware.anon_user.ConnectToSessionMessagesMiddleware',
29 'forum.middleware.request_utils.RequestUtils',
30 'forum.middleware.cancel.CancelActionMiddleware',
31 #'recaptcha_django.middleware.ReCaptchaMiddleware',
32 'django.middleware.transaction.TransactionMiddleware',
35 TEMPLATE_CONTEXT_PROCESSORS = (
36 'django.core.context_processors.request',
37 'forum.context.application_settings',
38 #'django.core.context_processors.i18n',
39 'forum.user_messages.context_processors.user_messages',#must be before auth
40 'django.core.context_processors.auth', #this is required for admin
46 os.path.join(os.path.dirname(__file__),'forum','skins').replace('\\','/'),
50 FILE_UPLOAD_TEMP_DIR = os.path.join(os.path.dirname(__file__), 'tmp').replace('\\','/')
51 FILE_UPLOAD_HANDLERS = ("django.core.files.uploadhandler.MemoryFileUploadHandler",
52 "django.core.files.uploadhandler.TemporaryFileUploadHandler",)
53 DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
55 ALLOW_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
57 ALLOW_MAX_FILE_SIZE = 1024 * 1024
60 from settings_local import *
63 if len(FORUM_SCRIPT_ALIAS) > 0:
64 APP_URL = '%s/%s' % (APP_URL, FORUM_SCRIPT_ALIAS[:-1])
68 app_url_split = APP_URL.split("://")
70 APP_PROTOCOL = app_url_split[0]
71 APP_DOMAIN = app_url_split[1].split('/')[0]
72 APP_BASE_URL = '%s://%s' % (APP_PROTOCOL, APP_DOMAIN)
74 FORCE_SCRIPT_NAME = ''
76 for path in app_url_split[1].split('/')[1:]:
77 FORCE_SCRIPT_NAME = FORCE_SCRIPT_NAME + '/' + path
79 if FORCE_SCRIPT_NAME.endswith('/'):
80 FORCE_SCRIPT_NAME = FORCE_SCRIPT_NAME[:-1]
83 'django.contrib.auth',
84 'django.contrib.contenttypes',
85 'django.contrib.sessions',
86 'django.contrib.sites',
87 'django.contrib.admin',
88 'django.contrib.humanize',
89 'django.contrib.sitemaps',
90 'django.contrib.markup',
97 MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware')
98 INSTALLED_APPS.append('debug_toolbar')
104 INSTALLED_APPS.append('south')
111 INSTALLED_APPS.append('rosetta')
115 AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend',]