-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.py
117 lines (96 loc) · 2.98 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# encoding: utf-8
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
relative_to_project_root = lambda *x: os.path.join(PROJECT_ROOT, *x)
import djcelery
djcelery.setup_loader()
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = ()
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': relative_to_project_root('istweb_db'),
'USER': 'istweb_proj', # Not used with sqlite3.
'PASSWORD': '123456', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
TIME_ZONE = 'Asia/Shanghai'
LANGUAGE_CODE = 'zh-cn'
USE_I18N = True
USE_L10N = True
SITE_ID = 1
MEDIA_ROOT = relative_to_project_root('uploads')
MEDIA_URL = ''
STATIC_ROOT = relative_to_project_root('static')
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
STATICFILES_DIRS = (
relative_to_project_root('assets'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'YymbZIjMfikrwqPnWARCVaplc`[zeJto\\OKFXgvShLuUx_^HTQ'
TEMPLATE_DIRS = (
relative_to_project_root('templates'),
)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'users.middleware.RestrictAccessMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.static',
'contacts.views.contacts_list',
)
CARROT_BACKEND = "django"
INSTALLED_APPS = (
'south',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.staticfiles',
'home',
'users',
'contacts',
'notification',
'djcelery',
'ghettoq',
'kombu.transport.django',
'recommendation',
)
BROKER_BACKEND = 'djkombu.transport.DatabaseTransport'
BROKER_HOST = 'localhost'
BROKER_PORT = 5672
BROKER_USER = "hukm"
BROKER_PASSWORD = "123"
BROKER_VHOST = '/'
ROOT_URLCONF = 'istweb.urls'
LOGIN_URL = '/login'
LOGOUT_URL = '/logout'
LOGIN_REDIRECT_URL = '/'
EXCLUDED_URLS = (
'/admin',
'/login',
'/favicon.ico',
'/static/',
)
RESTRICTED_URLS = ()