source: subversion/sites/other/tilesAtHome_tahngo/settings.py.example @ 10419

Last change on this file since 10419 was 10349, checked in by spaetz, 11 years ago

remove unused 'Blank' class. some cleantup and comments. Use LOGFILE setting in settings.py and not hardcoded in tah_intern/views.py

File size: 3.8 KB
Line 
1# Django settings for tah project.
2
3DEBUG = True
4TEMPLATE_DEBUG = DEBUG
5
6ADMINS = (
7    # ('Your Name', 'your_email@domain.com'),
8)
9
10#------------------------------------------------
11#a little ugly place for setting up the logging perhaps.
12LOGFILE = '/var/log/tah/tahngo.log'
13import logging
14if not getattr(logging, "set_up_done", None):
15    logging.basicConfig(level=logging.DEBUG,
16                    format='%(asctime)s %(levelname)s %(message)s',
17                    datefmt = "%y-%m-%d-%H:%M:%S",
18                    filename= LOGFILE,
19                   )
20    logging.set_up_done=True
21#------------------------------------------------
22
23MANAGERS = ADMINS
24AUTH_PROFILE_MODULE="user.TahUser"
25AUTHENTICATION_BACKENDS=('django.contrib.auth.backends.ModelBackend','tah.user.auth.OSMBackend')
26
27DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
28DATABASE_NAME = '/var/www/sspaeth.de/tah/tah.db'             # Or path to database file if using sqlite3.
29DATABASE_USER = ''             # Not used with sqlite3.
30DATABASE_PASSWORD = ''         # Not used with sqlite3.
31DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
32DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
33
34LOGIN_REDIRECT_URL="/~spaetz/user"
35
36# Local time zone for this installation. Choices can be found here:
37# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
38# although not all choices may be avilable on all operating systems.
39# If running in a Windows environment this must be set to the same as your
40# system time zone.
41TIME_ZONE = 'America/Chicago'
42
43# Language code for this installation. All choices can be found here:
44# http://www.i18nguy.com/unicode/language-identifiers.html
45LANGUAGE_CODE = 'en-us'
46
47SITE_ID = 1
48
49# If you set this to False, Django will make some optimizations so as not
50# to load the internationalization machinery.
51USE_I18N = False
52
53# Absolute path to the directory that holds media. Used for e.g. uploading files to.
54MEDIA_ROOT = '/var/www/sspaeth.de/tah'
55# where the tile files are stored:
56TILES_ROOT = '/mnt/agami/openstreetmap/tah/Tiles/'
57
58# URL that handles the media served from MEDIA_ROOT. Make sure to use a
59# trailing slash if there is a path component (optional in other cases).
60# Examples: "http://media.lawrence.com", "http://example.com/media/"
61MEDIA_URL = 'http://tah.openstreetmap.org/tah/'
62
63# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
64# trailing slash.
65# Examples: "http://foo.com/media/", "/media/".
66ADMIN_MEDIA_PREFIX = '/~spaetz/admin_media/'
67
68# Make this unique, and don't share it with anybody.
69SECRET_KEY = '#(2dlldd@za!(k$vm0jn+%s#wkfrm8v^0wl14lc&$8yb4j+e)m'
70
71# List of callables that know how to import templates from various sources.
72TEMPLATE_LOADERS = (
73    'django.template.loaders.filesystem.load_template_source',
74    'django.template.loaders.app_directories.load_template_source',
75#     'django.template.loaders.eggs.load_template_source',
76)
77
78MIDDLEWARE_CLASSES = (
79    'django.middleware.common.CommonMiddleware',
80    #translates the HTTP_X_FORWARDED_FOR to REMOTE_ADDR
81    'django.middleware.http.SetRemoteAddrFromForwardedFor',
82    'django.contrib.sessions.middleware.SessionMiddleware',
83    'django.contrib.auth.middleware.AuthenticationMiddleware',
84    'django.middleware.doc.XViewMiddleware',
85)
86
87ROOT_URLCONF = 'tah.spaetzurls'
88
89TEMPLATE_DIRS = (
90    '/var/www/sspaeth.de/tah/templates',
91    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
92    # Don't forget to use absolute paths, not relative paths.
93)
94
95INSTALLED_APPS = (
96    'django.contrib.auth',
97    'django.contrib.contenttypes',
98    'django.contrib.sessions',
99    'django.contrib.sites',
100    'django.contrib.admin',
101    'tah.user',
102    'tah.browse',
103    'tah.requests',
104    'tah.tah_intern',
105)
Note: See TracBrowser for help on using the repository browser.