-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
95 lines (82 loc) · 3.01 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# -*- coding: utf-8 -*-
import os
from ragendja.settings_pre import *
# Increase this when you update your media on the production site, so users
# don't have to refresh their cache. By setting this your MEDIA_URL
# automatically becomes /media/MEDIA_VERSION/
MEDIA_VERSION = 1
# Make this unique, and don't share it with anybody.
SECRET_KEY = '1234567890'
#ENABLE_PROFILER = True
#ONLY_FORCED_PROFILE = True
#PROFILE_PERCENTAGE = 25
#SORT_PROFILE_RESULTS_BY = 'cumulative' # default is 'time'
#PROFILE_PATTERN = 'ext.db..+\((?:get|get_by_key_name|fetch|count|put)\)'
# Enable I18N and set default language to 'en'
USE_I18N = True #False(en)/True(cn)
LANGUAGE_CODE = 'zh_CN'
#Restrict supported languages (and JS media generation)
#LANGUAGES = (
# ('en', 'English'),
# ('zh_CN', '简体中文'),
#)
#must be admin email of your GAE . 'yourgmail@gmail.com'
DEFAULT_FROM_EMAIL = 'guitang.yang@gmail.com'
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth',
'django.core.context_processors.media',
'django.core.context_processors.request',
'django.core.context_processors.i18n',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
# Django authentication
'django.contrib.auth.middleware.AuthenticationMiddleware',
# Google authentication
#'ragendja.auth.middleware.GoogleAuthenticationMiddleware',
# Hybrid Django/Google authentication
#'ragendja.auth.middleware.HybridAuthenticationMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.locale.LocaleMiddleware',
'ragendja.sites.dynamicsite.DynamicSiteIDMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
)
# Google authentication
#AUTH_USER_MODULE = 'ragendja.auth.google_models'
#AUTH_ADMIN_MODULE = 'ragendja.auth.google_admin'
# Hybrid Django/Google authentication
#AUTH_USER_MODULE = 'ragendja.auth.hybrid_models'
GLOBALTAGS = (
'ragendja.templatetags.ragendjatags',
'django.templatetags.i18n',
)
TEMPLATE_DIRS = [
#os.path.join(os.path.dirname(__file__), './themes/default/templates').replace('\\','/'),
#os.path.join(os.path.dirname(__file__), './themes').replace('\\','/'),
#'./themes/default/templates',
#os.path.join(os.path.dirname(__file__), 'themes/bloger/templates').replace('\\','/')
]
#'''
themes = os.listdir(os.path.join(os.path.dirname(__file__), 'themes'))
for theme in themes:
TEMPLATE_DIRS.append(os.path.join(os.path.dirname(__file__), 'themes/%s/templates'%theme).replace('\\','/'))
#'''
LOGIN_URL = '/account/login/'
LOGOUT_URL = '/account/logout/'
LOGIN_REDIRECT_URL = '/'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.webdesign',
#'django.contrib.flatpages',
'django.contrib.redirects',
'django.contrib.sites',
'appenginepatcher',
#'myapp',
'registration',
#'mediautils',
'cms',
)
from ragendja.settings_post import *