7 ADMIN_MEDIA_PREFIX = '/admin_media/'
8 SECRET_KEY = '$oo^&_m&qwbib=(_4m_n*zn-d=g#s0he5fx9xonnym#8p6yigm'
11 'django.template.loaders.filesystem.load_template_source',
12 'django.template.loaders.app_directories.load_template_source',
13 'forum.modules.template_loader.module_templates_loader',
14 'forum.skins.load_template_source',
17 MIDDLEWARE_CLASSES = [
18 'django.middleware.csrf.CsrfViewMiddleware',
19 'django.middleware.csrf.CsrfResponseMiddleware',
20 'django.contrib.sessions.middleware.SessionMiddleware',
21 'django.middleware.common.CommonMiddleware',
22 'forum.middleware.extended_user.ExtendedUser',
23 'forum.middleware.anon_user.ConnectToSessionMessagesMiddleware',
24 'forum.middleware.request_utils.RequestUtils',
25 'forum.middleware.cancel.CancelActionMiddleware',
26 'forum.middleware.admin_messages.AdminMessagesMiddleware',
27 'django.middleware.transaction.TransactionMiddleware',
30 TEMPLATE_CONTEXT_PROCESSORS = [
31 'django.core.context_processors.request',
32 'forum.context.application_settings',
33 'forum.user_messages.context_processors.user_messages',
34 'django.core.context_processors.auth',
41 os.path.join(os.path.dirname(__file__),'forum','skins').replace('\\','/'),
45 FILE_UPLOAD_TEMP_DIR = os.path.join(os.path.dirname(__file__), 'tmp').replace('\\','/')
46 FILE_UPLOAD_HANDLERS = ("django.core.files.uploadhandler.MemoryFileUploadHandler",
47 "django.core.files.uploadhandler.TemporaryFileUploadHandler",)
48 DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
50 ALLOW_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
51 ALLOW_MAX_FILE_SIZE = 1024 * 1024
54 from settings_local import *
57 if len(FORUM_SCRIPT_ALIAS) > 0:
58 APP_URL = '%s/%s' % (APP_URL, FORUM_SCRIPT_ALIAS[:-1])
62 app_url_split = APP_URL.split("://")
64 APP_PROTOCOL = app_url_split[0]
65 APP_DOMAIN = app_url_split[1].split('/')[0]
66 APP_BASE_URL = '%s://%s' % (APP_PROTOCOL, APP_DOMAIN)
68 FORCE_SCRIPT_NAME = ''
70 for path in app_url_split[1].split('/')[1:]:
71 FORCE_SCRIPT_NAME = FORCE_SCRIPT_NAME + '/' + path
73 if FORCE_SCRIPT_NAME.endswith('/'):
74 FORCE_SCRIPT_NAME = FORCE_SCRIPT_NAME[:-1]
76 #Module system initialization
77 MODULES_PACKAGE = 'forum_modules'
78 MODULES_FOLDER = os.path.join(SITE_SRC_ROOT, MODULES_PACKAGE)
80 MODULE_LIST = filter(lambda m: getattr(m, 'CAN_USE', True), [
81 __import__('forum_modules.%s' % f, globals(), locals(), ['forum_modules'])
82 for f in os.listdir(MODULES_FOLDER)
83 if os.path.isdir(os.path.join(MODULES_FOLDER, f)) and
84 os.path.exists(os.path.join(MODULES_FOLDER, "%s/__init__.py" % f)) and
85 not f in DISABLED_MODULES
88 [MIDDLEWARE_CLASSES.extend(
89 ["%s.%s" % (m.__name__, mc) for mc in getattr(m, 'MIDDLEWARE_CLASSES', [])]
90 ) for m in MODULE_LIST]
92 [TEMPLATE_LOADERS.extend(
93 ["%s.%s" % (m.__name__, tl) for tl in getattr(m, 'TEMPLATE_LOADERS', [])]
94 ) for m in MODULE_LIST]
98 'django.contrib.auth',
99 'django.contrib.contenttypes',
100 'django.contrib.sessions',
101 'django.contrib.sites',
102 'django.contrib.admin',
103 'django.contrib.humanize',
104 'django.contrib.sitemaps',
105 'django.contrib.markup',
112 MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware')
113 INSTALLED_APPS.append('debug_toolbar')
119 INSTALLED_APPS.append('south')
126 INSTALLED_APPS.append('rosetta')
130 AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend',]