annotate examples/project/settings.py @ 12:a6e52c3b64a8 tip

added a version code to nosedjango
author Victor Ng <victor@monkeybean.ca>
date Fri, 29 Aug 2008 14:10:47 -0400
parents 35178e70f1cd
children
rev   line source
8
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents: 6
diff changeset
1 # Django settings for 'project' project.
6
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
2
9
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
3 import os
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
4 PROJECT_PATH = os.path.abspath(os.path.split(__file__)[0])
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
5
6
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
6 DEBUG = True
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
7 TEMPLATE_DEBUG = DEBUG
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
8
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
9 ADMINS = (
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
10 # ('Your Name', 'your_email@domain.com'),
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
11 )
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
12
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
13 MANAGERS = ADMINS
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
14
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
15 DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
9
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
16 DATABASE_NAME = os.path.join(PROJECT_PATH, 'zoo.db') # Or path to database file if using sqlite3.
6
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
17 DATABASE_USER = '' # Not used with sqlite3.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
18 DATABASE_PASSWORD = '' # Not used with sqlite3.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
19 DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
20 DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
21
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
22 # Local time zone for this installation. Choices can be found here:
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
23 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
24 # although not all choices may be available on all operating systems.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
25 # If running in a Windows environment this must be set to the same as your
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
26 # system time zone.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
27 TIME_ZONE = 'America/Chicago'
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
28
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
29 # Language code for this installation. All choices can be found here:
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
30 # http://www.i18nguy.com/unicode/language-identifiers.html
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
31 LANGUAGE_CODE = 'en-us'
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
32
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
33 SITE_ID = 1
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
34
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
35 # If you set this to False, Django will make some optimizations so as not
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
36 # to load the internationalization machinery.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
37 USE_I18N = True
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
38
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
39 # Absolute path to the directory that holds media.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
40 # Example: "/home/media/media.lawrence.com/"
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
41 MEDIA_ROOT = ''
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
42
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
43 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
44 # trailing slash if there is a path component (optional in other cases).
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
45 # Examples: "http://media.lawrence.com", "http://example.com/media/"
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
46 MEDIA_URL = ''
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
47
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
48 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
49 # trailing slash.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
50 # Examples: "http://foo.com/media/", "/media/".
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
51 ADMIN_MEDIA_PREFIX = '/media/'
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
52
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
53 # Make this unique, and don't share it with anybody.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
54 SECRET_KEY = '3r+%mj&(wg@l2wcq)&g!x^cj2@u28vr=pahbive*#am44-p$u)'
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
55
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
56 # List of callables that know how to import templates from various sources.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
57 TEMPLATE_LOADERS = (
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
58 'django.template.loaders.filesystem.load_template_source',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
59 'django.template.loaders.app_directories.load_template_source',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
60 # 'django.template.loaders.eggs.load_template_source',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
61 )
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
62
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
63 MIDDLEWARE_CLASSES = (
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
64 'django.middleware.common.CommonMiddleware',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
65 'django.contrib.sessions.middleware.SessionMiddleware',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
66 'django.contrib.auth.middleware.AuthenticationMiddleware',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
67 'django.middleware.doc.XViewMiddleware',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
68 )
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
69
8
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents: 6
diff changeset
70 ROOT_URLCONF = 'project.urls'
6
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
71
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
72 TEMPLATE_DIRS = (
9
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
73 os.path.join(PROJECT_PATH, 'templates'),
6
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
74 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
75 # Always use forward slashes, even on Windows.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
76 # Don't forget to use absolute paths, not relative paths.
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
77 )
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
78
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
79 INSTALLED_APPS = (
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
80 'django.contrib.admin',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
81 'django.contrib.auth',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
82 'django.contrib.contenttypes',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
83 'django.contrib.sessions',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
84 'django.contrib.sites',
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
85 'project.zoo'
8d0793b2358b update testapp to django 1.0b1
Victor Ng <victor@monkeybean.ca>
parents: 5
diff changeset
86 )
9
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
87 handler500 = 'django.views.defaults.server_error'
35178e70f1cd urls support in testcase objects
Victor Ng <victor@monkeybean.ca>
parents: 8
diff changeset
88