New admin url syntax
[eatslugs.git] / eatslugs / settings.py
1 # Django settings for eatslugs project.
2
3 # Rather than editing settings here, add them to the localsettings.py file
4 # which will be included at the end of the run and replace anything in here.
5
6 import os
7 topdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
8
9 DEBUG = True
10 TEMPLATE_DEBUG = DEBUG
11
12 ADMINS = (
13     ('Brett Parker', 'iDunno@sommitrealweird.co.uk'),
14 )
15
16 MANAGERS = ADMINS
17
18 DATABASE_ENGINE = 'sqlite3'
19 DATABASE_NAME = os.path.join(topdir, 'eatslugs.db')
20 DATABASE_USER = ''
21 DATABASE_PASSWORD = ''
22 DATABASE_HOST = ''
23 DATABASE_PORT = ''
24
25 TIME_ZONE = 'Europe/London'
26
27 LANGUAGE_CODE = 'en-gb'
28
29 SITE_ID = 1
30
31 # If you set this to False, Django will make some optimizations so as not
32 # to load the internationalization machinery.
33 USE_I18N = True
34
35 MEDIA_ROOT = os.path.join(topdir, 'media') + os.sep
36 MEDIA_URL = '/media/'
37
38 ADMIN_MEDIA_PREFIX = '/admin-media/'
39
40 import random
41 import string
42 key_chars = "%s%s%s" %(string.letters, string.digits, '+-()_#~')
43 SECRET_KEY = "".join([random.choice(key_chars) for a in range(0,50)])
44
45 # List of callables that know how to import templates from various sources.
46 TEMPLATE_LOADERS = (
47     'django.template.loaders.filesystem.load_template_source',
48     'django.template.loaders.app_directories.load_template_source',
49 )
50
51 MIDDLEWARE_CLASSES = (
52     'django.middleware.common.CommonMiddleware',
53     'django.contrib.sessions.middleware.SessionMiddleware',
54     'django.contrib.auth.middleware.AuthenticationMiddleware',
55 )
56
57 ROOT_URLCONF = 'urls'
58
59 TEMPLATE_DIRS = (
60     os.path.join(topdir, 'templates')
61 )
62
63 INSTALLED_APPS = (
64     'django.contrib.admin',
65     'django.contrib.auth',
66     'django.contrib.contenttypes',
67     'django.contrib.sessions',
68     'django.contrib.sites',
69     'recipes',
70 )
71
72 TEMPLATE_CONTEXT_PROCESSORS = (
73     'django.core.context_processors.auth',
74     'django.core.context_processors.debug',
75     'django.core.context_processors.i18n',
76     'generic.context_processors.media',
77 )
78
79 try:
80     from localsettings import *
81 except:
82     pass
83