PageRenderTime 17ms CodeModel.GetById 2ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

/settings.py

https://bitbucket.org/bconstantin/django_polymorphic/
Python | 97 lines | 80 code | 10 blank | 7 comment | 4 complexity | ef16f0a1f30cdacf05c4e136b63b5795 MD5 | raw file
 1# Django settings for polymorphic_demo project.
 2
 3DEBUG = True
 4TEMPLATE_DEBUG = DEBUG
 5
 6ADMINS = (
 7    # ('Your Name', 'your_email@domain.com'),
 8)
 9
10MANAGERS = ADMINS
11
12import django
13import os
14
15if os.path.ismount('/ram'):
16    SQLITE_DB_PATH = '/ram/django-polymorphic-test-db.sqlite3'
17else:
18    SQLITE_DB_PATH = '/var/tmp/django-polymorphic-test-db.sqlite3'
19
20if django.VERSION[:2][0]>=1 and django.VERSION[:2][1]>=3:
21    DATABASES = {
22        'default': {
23            'ENGINE': 'django.db.backends.sqlite3',
24            'NAME': SQLITE_DB_PATH
25        }
26    }
27else:
28    DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
29    DATABASE_NAME = SQLITE_DB_PATH             # Or path to database file if using sqlite3.
30    DATABASE_USER = ''             # Not used with sqlite3.
31    DATABASE_PASSWORD = ''         # Not used with sqlite3.
32    DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
33    DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
34
35# Local time zone for this installation. Choices can be found here:
36# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
37# although not all choices may be available on all operating systems.
38# If running in a Windows environment this must be set to the same as your
39# system time zone.
40TIME_ZONE = 'America/Chicago'
41
42# Language code for this installation. All choices can be found here:
43# http://www.i18nguy.com/unicode/language-identifiers.html
44LANGUAGE_CODE = 'en-us'
45
46SITE_ID = 1
47
48# If you set this to False, Django will make some optimizations so as not
49# to load the internationalization machinery.
50USE_I18N = True
51
52# Absolute path to the directory that holds media.
53# Example: "/home/media/media.lawrence.com/"
54MEDIA_ROOT = ''
55
56# URL that handles the media served from MEDIA_ROOT. Make sure to use a
57# trailing slash if there is a path component (optional in other cases).
58# Examples: "http://media.lawrence.com", "http://example.com/media/"
59MEDIA_URL = ''
60
61# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
62# trailing slash.
63# Examples: "http://foo.com/media/", "/media/".
64ADMIN_MEDIA_PREFIX = '/media/'
65
66# Make this unique, and don't share it with anybody.
67SECRET_KEY = 'nk=c&k+c&#+)8557)%&0auysdd3g^sfq6@rw8_x1k8)-p@y)!('
68
69# List of callables that know how to import templates from various sources.
70TEMPLATE_LOADERS = (
71    'django.template.loaders.filesystem.load_template_source',
72    'django.template.loaders.app_directories.load_template_source',
73#     'django.template.loaders.eggs.load_template_source',
74)
75
76MIDDLEWARE_CLASSES = (
77    'django.middleware.common.CommonMiddleware',
78    'django.contrib.sessions.middleware.SessionMiddleware',
79    'django.contrib.auth.middleware.AuthenticationMiddleware',
80)
81
82ROOT_URLCONF = ''
83
84TEMPLATE_DIRS = (
85    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
86    # Always use forward slashes, even on Windows.
87    # Don't forget to use absolute paths, not relative paths.
88)
89
90INSTALLED_APPS = (
91    #'django.contrib.auth',
92    'django.contrib.contenttypes',
93    #'django.contrib.sessions',
94    #'django.contrib.sites',
95    'polymorphic',      # only needed if you want to use polymorphic_dumpdata
96    'pexp',             # this Django app is for testing and experimentation; not needed otherwise
97)