-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
149 lines (122 loc) · 4.06 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# -*- coding: utf-8 -*-
# The following takes care of auto-configuring the database. You might want to
# modify this to match your environment (i.e., without fallbacks).
try:
from djangoappengine.settings_base import *
has_djangoappengine = True
except ImportError:
has_djangoappengine = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# Fall back to MongoDB if App Engine isn't used (note that other backends
# including SQL should work, too)
DATABASES = {
'default': {
'ENGINE': 'django_mongodb_engine',
'NAME': 'test',
'USER': '',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': 27017,
}
}
import os
# Activate django-dbindexer for the default database
DATABASES['native'] = DATABASES['default']
DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native'}
AUTOLOAD_SITECONF = 'dbindexes'
SITE_NAME = 'My site'
SITE_DESCRIPTION = ''
SITE_COPYRIGHT = ''
DISQUS_SHORTNAME = ''
GOOGLE_ANALYTICS_ID = ''
# Get the ID from the CSE "Basics" control panel ("Search engine unique ID")
GOOGLE_CUSTOM_SEARCH_ID = ''
# Set RT username for retweet buttons
TWITTER_USERNAME = ''
# In order to always have uniform URLs in retweets and FeedBurner we redirect
# any access to URLs that are not in ALLOWED_DOMAINS to the first allowed
# domain. You can have additional domains for testing.
ALLOWED_DOMAINS = ()
SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi'
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.contenttypes',
'django.contrib.sitemaps',
'urlrouter',
'minicms',
'blog',
'disqus',
'djangotoolbox',
'google_analytics',
'google_cse',
'mediagenerator',
'robots',
'simplesocial',
'redirects',
'autoload',
'dbindexer',
)
if has_djangoappengine:
# djangoappengine should come last, so it can override a few manage.py commands
INSTALLED_APPS += ('djangoappengine',)
else:
INSTALLED_APPS += ('django_mongodb_engine',)
TEST_RUNNER = 'djangotoolbox.test.CapturingTestSuiteRunner'
REST_BACKENDS = (
'minicms.markup_highlight',
'blog.markup_posts',
)
MIDDLEWARE_CLASSES = (
# This loads the index definitions, so it has to come first
'autoload.middleware.AutoloadMiddleware',
'mediagenerator.middleware.MediaMiddleware',
'django.middleware.common.CommonMiddleware',
'djangotoolbox.middleware.RedirectMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'urlrouter.middleware.URLRouterFallbackMiddleware',
)
URL_ROUTE_HANDLERS = (
'minicms.urlroutes.PageRoutes',
'blog.urlroutes.BlogRoutes',
'blog.urlroutes.BlogPostRoutes',
'redirects.urlroutes.RedirectRoutes',
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.request',
'django.core.context_processors.media',
'minicms.context_processors.cms',
)
USE_I18N = False
TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)
MEDIA_BUNDLES = (
('main.css',
'design.sass',
'rest.css',
),
)
ROOT_MEDIA_FILTERS = {
'js': 'mediagenerator.filters.closure.Closure',
'css': 'mediagenerator.filters.yuicompressor.YUICompressor',
}
CLOSURE_COMPILER_PATH = os.path.join(os.path.dirname(__file__),
'.webutils', 'compiler.jar')
YUICOMPRESSOR_PATH = os.path.join(os.path.dirname(__file__),
'.webutils', 'yuicompressor.jar')
MEDIA_DEV_MODE = DEBUG
DEV_MEDIA_URL = '/devmedia/'
PRODUCTION_MEDIA_URL = '/media/'
GLOBAL_MEDIA_DIRS = (
os.path.join(os.path.dirname(__file__), 'static'),
)
ADMIN_MEDIA_PREFIX = '/media/admin/'
ROOT_URLCONF = 'urls'
NON_REDIRECTED_PATHS = ('/admin/',)
try:
from settings_local import *
except ImportError:
pass