summaryrefslogtreecommitdiffstats
path: root/local_settings.py.example
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-16 23:30:14 +0200
committerDan McGee <dan@archlinux.org>2011-08-16 23:30:14 +0200
commite3ac14389448a73d9f9b8286a25930f3978784fb (patch)
treebd73279016198fdf7a5b152d68d82cd48a7a9f82 /local_settings.py.example
parentb6f86d9ab0d6910f0f70398b07e965d337bd9e78 (diff)
downloadarchweb-e3ac14389448a73d9f9b8286a25930f3978784fb.tar.gz
archweb-e3ac14389448a73d9f9b8286a25930f3978784fb.tar.xz
Settings refresh
Update a few things in settings.py, but more importantly, update local_settings.py.template to be more in line with modern Django settings. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'local_settings.py.example')
-rw-r--r--local_settings.py.example58
1 files changed, 38 insertions, 20 deletions
diff --git a/local_settings.py.example b/local_settings.py.example
index 9af4ebc..beb48f8 100644
--- a/local_settings.py.example
+++ b/local_settings.py.example
@@ -2,41 +2,59 @@
## Debug settings
DEBUG = False
+TEMPLATE_DEBUG = True
+DEBUG_TOOLBAR = True
+
+## For django debug toolbar
+INTERNAL_IPS = ('127.0.0.1',)
## Notification admins
ADMINS = (
# ('Joe Admin', 'joeadmin@example.com'),
)
-## Sqlite Database settings
-#DATABASE_ENGINE = 'sqlite3'
-#DATABASE_NAME = 'archweb.db'
-
## MySQL Database settings
-#DATABASE_ENGINE = 'mysql'
-#DATABASE_NAME = 'archlinux'
-#DATABASE_USER = 'archlinux'
-#DATABASE_PASSWORD = 'archlinux'
-#DATABASE_HOST = ''
-#DATABASE_PORT = ''
-
-## Define cache middleware settings
-CACHE_BACKEND = 'memcached://127.0.0.1:11211'
-CACHE_MIDDLEWARE_SECONDS = 900
+DATABASES = {
+ 'default': {
+ 'ENGINE' : 'django.db.backends.mysql',
+ 'NAME' : 'archlinux',
+ 'USER' : 'archlinux',
+ 'PASSWORD': 'archlinux',
+ 'HOST' : '',
+ 'PORT' : '',
+ 'OPTIONS' : {'init_command': 'SET storage_engine=InnoDB'},
+ },
+}
+
+## Define cache settings
+CACHES = {
+ 'default': {
+ 'BACKEND' : 'django.core.cache.backends.dummy.DummyCache',
+ #'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
+ #'LOCATION': '127.0.0.1:11211',
+ }
+}
CACHE_MIDDLEWARE_KEY_PREFIX = 'arch'
+CACHE_MIDDLEWARE_SECONDS = 300
+
+## Use secure session cookies? Make this true if you want all
+## logged-in actions to take place over HTTPS only. If developing
+## locally, you will want to use False.
+SESSION_COOKIE_SECURE = False
## location for saving dev pictures
-MEDIA_ROOT = '/var/www/archlinux/htdocs/img/'
+MEDIA_ROOT = '/srv/example.com/img/'
## web url for serving image files
-MEDIA_URL = 'http://www.archlinux.org/img/'
+MEDIA_URL = 'http://example.com/img/'
## Make this unique, and don't share it with anybody.
SECRET_KEY = '00000000000000000000000000000000000000000000000'
-#dummy cache
-if DEBUG:
- CACHE_BACKEND = 'dummy:///'
+## CDN settings
+CDN_ENABLED = False
+CDN_PATH = 'http://example.com/path/'
+CDN_PATH_SECURE = 'https://example.com/path/'
-# vim: set ts=4 sw=4 et:
+# vim: set ts=4 sw=4 et: