view settings.py @ 915:8b5437fb248a
Fix for signals refactoring
| author |
Alexander Solovyov <piranha@piranha.org.ua> |
| date |
Thu Aug 14 11:12:23 2008 +0300 (19 months ago) |
| parents |
f1e29226475e |
| children |
98f84942cd07 |
line source
1 # -*- encoding: utf-8 -*-
4 # DO NOT EDIT THIS FILE!
6 # If you want to make your own changes, do them in settings_local.py. All
7 # variables set in the settings_local.py will override corresponding values from
14 PROJECT_ROOT = os.path.dirname(__file__)
16 sys.path.insert(0, os.path.join(PROJECT_ROOT, 'apps'))
17 sys.path.insert(0, os.path.join(PROJECT_ROOT, 'compat'))
20 TEMPLATE_DEBUG = DEBUG
22 # Possible choices are: ''|'simple'|'recaptcha'
23 # To utilize recaptcha you must get public/private keys
24 # from http://recaptcha.net/
26 RECAPTCHA_PUBLIC_KEY = ''
27 RECAPTCHA_PRIVATE_KEY =''
31 # ('Your Name', 'your_email@domain.com'),
36 # Local time zone for this installation. All choices can be found here:
37 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
38 TIME_ZONE = 'Europe/Kiev'
40 # Language code for this installation. All choices can be found here:
41 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
42 # http://blogs.law.harvard.edu/tech/stories/storyReader$15
43 LANGUAGE_CODE = 'en-us'
47 # If you set this to False, Django will make some optimizations so as not
48 # to load the internationalization machinery.
51 # Absolute path to the directory that holds media.
52 # Example: "/home/media/media.lawrence.com/"
53 MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
54 STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
56 # URL that handles the media served from MEDIA_ROOT.
57 # Example: "http://media.lawrence.com"
59 STATIC_URL = '/static/'
61 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
63 # Examples: "http://foo.com/media/", "/media/".
64 ADMIN_MEDIA_PREFIX = '/admin-media/'
66 # Don't share it with anybody
67 if not hasattr(globals(), 'SECRET_KEY'):
68 SECRET_FILE = os.path.join(PROJECT_ROOT, 'secret.txt')
70 SECRET_KEY = open(SECRET_FILE).read().strip()
73 from random import choice
74 SECRET_KEY = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])
75 secret = file(SECRET_FILE, 'w')
76 secret.write(SECRET_KEY)
79 raise Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)
81 # List of callables that know how to import templates from various sources.
83 'lib.template_loaders.get_theme_template',
84 'django.template.loaders.filesystem.load_template_source',
85 'django.template.loaders.app_directories.load_template_source',
86 # 'django.template.loaders.eggs.load_template_source',
89 MIDDLEWARE_CLASSES = (
90 'django.middleware.common.CommonMiddleware',
91 'lib.threadlocals.ThreadLocalsMiddleware',
92 'django.contrib.sessions.middleware.SessionMiddleware',
93 'middleware.url.UrlMiddleware',
94 'django.middleware.locale.LocaleMiddleware',
95 'django.contrib.auth.middleware.AuthenticationMiddleware',
96 'middleware.redirect.RedirectMiddleware',
97 'openidconsumer.middleware.OpenIDMiddleware',
98 'django.middleware.doc.XViewMiddleware',
99 'middleware.ajax_errors.AjaxMiddleware',
100 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
103 TEMPLATE_CONTEXT_PROCESSORS = [
104 "django.core.context_processors.auth",
105 "django.core.context_processors.debug",
106 "django.core.context_processors.i18n",
107 "django.core.context_processors.media",
108 "django.core.context_processors.request",
109 "context_processors.settings_vars",
112 AUTHENTICATION_BACKENDS = (
113 'django.contrib.auth.backends.ModelBackend',
114 'accounts.backends.CommentApprovingBackend',
115 'accounts.backends.EmailBackend',
116 'openidconsumer.backend.OpenidBackend',
119 ROOT_URLCONF = 'urls'
122 os.path.join(PROJECT_ROOT, 'templates'),
126 'django.contrib.auth',
127 'django.contrib.contenttypes',
128 'django.contrib.sessions',
129 'django.contrib.sites',
130 'django.contrib.admin',
131 'django.contrib.sitemaps',
132 'django.contrib.flatpages',
133 'django.contrib.markup',
157 SITE_PROTOCOL = 'http'
163 DATE_FORMAT = "j.m.Y"
165 ACTION_RECORD_DAYS = 3
166 # Set to integer value to close comments after this number of days
167 COMMENTS_EXPIRE_DAYS = None
170 FORCE_LOWERCASE_TAGS = True
173 OPENID_WITH_AUTH = True
174 OPENID_REDIRECT_NEXT = '/'
177 ENABLE_PINGBACK = True
179 'post_detail': 'pingback.getters.post_get',
181 PINGBACK_RESPONSE_LENGTH = 200
183 # Blogs directory ping
184 ENABLE_DIRECTORY_PING = False
185 # TODO: move this list to DB
187 'http://ping.blogs.yandex.ru/RPC2',
188 'http://rpc.technorati.com/rpc/ping',
191 # Default markup language for you posts. Choices are bbcode, text, html, markdown
192 RENDER_METHOD = 'markdown'
195 GRAVATAR_ENABLE = False
196 DEFAULT_AVATAR_IMG = 'avatar.jpg'
197 DEFAULT_AVATAR_SIZE = 80
198 DEFAULT_AVATAR_PATH = MEDIA_URL + 'avatars/'
200 #if "false" robots application would not use auto-generated sitemap.xml
201 ROBOTS_USE_SITEMAP = True
203 # Root urlconf component for all blog urls
204 BLOG_URLCONF_ROOT = 'blog/' # Don't forget that there must be no leading '/'
205 SET_URL_ROOT_HANDLER = True # Process or not process url '/', usable for flatpages
208 APPEND_MTIME_TO_STATIC = True # Modification time will be appended in media_css and media_js templatetags
209 WYSIWYG_ENABLE = False # WYSIWYG for post text in admin
210 ANONYMOUS_COMMENTS_APPROVED = False # Do anonymous comments become autoapproved?
211 CAPTCHA_ENABLED = ANONYMOUS_COMMENTS_APPROVED # Enable captcha?
212 DEBUG_SQL = False # Show debug information about sql queries at the bottom of page
213 ENABLE_IMPORT = False # Enable importers
214 ENABLE_LJ_CROSSPOST = False # Disable by defauls
215 SHORT_POSTS_IN_FEED = False # Show full post in feed
216 ENABLE_SAPE = False # Disable 'sape.ru' client
217 USE_ATOM = True # Atom is standard, so we're using it by default
220 # Name, url, title. When bool(name) is False, separator will be inserted
221 ('Blog', '/%s' % BLOG_URLCONF_ROOT, ''),
224 # See all choices in apps/blog/templatetags/bookmarks.py
225 SOCIAL_BOOKMARKS = ('delicious', 'reddit', 'slashdot', 'digg', 'technorati', 'google')
228 from settings_local import *
231 sys.stderr.write('Unable to read settings_local.py\n')
235 INSTALLED_APPS += ('wpimport', )
238 #INSTALLED_APPS += ('sape', )
240 if 'ADDITIONAL_APPS' in locals():
241 INSTALLED_APPS = INSTALLED_APPS + locals()['ADDITIONAL_APPS']
243 LOCALE_PATHS = (os.path.join(PROJECT_ROOT, 'locale'), )
244 THEME_STATIC_URL = os.path.join(STATIC_URL, THEME + '/')
247 MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('middleware.profile.ProfilerMiddleware', )