bartTC / dpaste_de
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
8cc2180
Martin Mahner (author)
Mon Nov 24 12:24:54 -0800 2008
dpaste_de / settings.py
| 87fb15db » | martin@mahner.org | 2008-08-07 | 1 | import os | |
| 2 | |||||
| 3 | PROJECT_ROOT = os.path.dirname(__file__) | ||||
| 4 | |||||
| 5 | # ############################################################################## | ||||
| 6 | # App specific settings | ||||
| 7 | # ############################################################################## | ||||
| 8 | |||||
| 9 | # How many recent snippets to save for every user? IDs of this snippets are | ||||
| 10 | # stored in the user session. | ||||
| 11 | MAX_SNIPPETS_PER_USER = 25 | ||||
| 12 | |||||
| 13 | # ############################################################################## | ||||
| 14 | # Default Django Settings | ||||
| 15 | # | ||||
| 16 | # You may want toset this settings in a file 'local_settings.py' to keep this | ||||
| 17 | # data on new subversion checkouts. | ||||
| 18 | # ############################################################################## | ||||
| 19 | |||||
| 20 | # Make this unique, and don't share it with anybody. | ||||
| 21 | SECRET_KEY = 'CHANGE_THIS_TO_ANYTHING_BUT_THIS' | ||||
| 8aad67be » | martin@mahner.org | 2008-08-07 | 22 | ||
| 23 | DEBUG = True | ||||
| 24 | TEMPLATE_DEBUG = DEBUG | ||||
| 25 | |||||
| 26 | ADMINS = ( | ||||
| 27 | # ('Your Name', 'your_email@domain.com'), | ||||
| 28 | ) | ||||
| 29 | |||||
| 30 | MANAGERS = ADMINS | ||||
| 31 | |||||
| 8cc21800 » | Martin Mahner | 2008-11-24 | 32 | DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | |
| 33 | DATABASE_NAME = 'dev.db' # Or path to database file if using sqlite3. | ||||
| 8aad67be » | martin@mahner.org | 2008-08-07 | 34 | DATABASE_USER = '' # Not used with sqlite3. | |
| 35 | DATABASE_PASSWORD = '' # Not used with sqlite3. | ||||
| 36 | DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. | ||||
| 37 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. | ||||
| 38 | |||||
| 39 | # Local time zone for this installation. Choices can be found here: | ||||
| 40 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | ||||
| 41 | # although not all choices may be available on all operating systems. | ||||
| 42 | # If running in a Windows environment this must be set to the same as your | ||||
| 43 | # system time zone. | ||||
| 87fb15db » | martin@mahner.org | 2008-08-07 | 44 | TIME_ZONE = 'UTC' | |
| 8aad67be » | martin@mahner.org | 2008-08-07 | 45 | ||
| 46 | # Language code for this installation. All choices can be found here: | ||||
| 47 | # http://www.i18nguy.com/unicode/language-identifiers.html | ||||
| 87fb15db » | martin@mahner.org | 2008-08-07 | 48 | LANGUAGE_CODE = 'en' | |
| 49 | LANGUAGES = ( | ||||
| ecd7fee4 » | martin@mahner.org | 2008-08-08 | 50 | ('de', 'German'), | |
| 87fb15db » | martin@mahner.org | 2008-08-07 | 51 | ('en', 'English'), | |
| 52 | ) | ||||
| 8aad67be » | martin@mahner.org | 2008-08-07 | 53 | ||
| 54 | SITE_ID = 1 | ||||
| 55 | |||||
| 56 | # If you set this to False, Django will make some optimizations so as not | ||||
| 57 | # to load the internationalization machinery. | ||||
| 58 | USE_I18N = True | ||||
| 59 | |||||
| 60 | # Absolute path to the directory that holds media. | ||||
| 61 | # Example: "/home/media/media.lawrence.com/" | ||||
| 87fb15db » | martin@mahner.org | 2008-08-07 | 62 | MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'site_media') | |
| 8aad67be » | martin@mahner.org | 2008-08-07 | 63 | ||
| 64 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | ||||
| 65 | # trailing slash if there is a path component (optional in other cases). | ||||
| 66 | # Examples: "http://media.lawrence.com", "http://example.com/media/" | ||||
| 87fb15db » | martin@mahner.org | 2008-08-07 | 67 | MEDIA_URL = '/media/' | |
| 8aad67be » | martin@mahner.org | 2008-08-07 | 68 | ||
| 69 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a | ||||
| 70 | # trailing slash. | ||||
| 71 | # Examples: "http://foo.com/media/", "/media/". | ||||
| 87fb15db » | martin@mahner.org | 2008-08-07 | 72 | ADMIN_MEDIA_PREFIX = '/admin_media/' | |
| 8aad67be » | martin@mahner.org | 2008-08-07 | 73 | ||
| 74 | # List of callables that know how to import templates from various sources. | ||||
| 75 | TEMPLATE_LOADERS = ( | ||||
| 76 | 'django.template.loaders.filesystem.load_template_source', | ||||
| 77 | 'django.template.loaders.app_directories.load_template_source', | ||||
| 78 | # 'django.template.loaders.eggs.load_template_source', | ||||
| 79 | ) | ||||
| 80 | |||||
| 81 | MIDDLEWARE_CLASSES = ( | ||||
| 82 | 'django.middleware.common.CommonMiddleware', | ||||
| 83 | 'django.contrib.sessions.middleware.SessionMiddleware', | ||||
| 84 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | ||||
| 85 | 'django.middleware.doc.XViewMiddleware', | ||||
| ecd7fee4 » | martin@mahner.org | 2008-08-08 | 86 | 'django.middleware.locale.LocaleMiddleware', | |
| 8aad67be » | martin@mahner.org | 2008-08-07 | 87 | ) | |
| 88 | |||||
| 89 | ROOT_URLCONF = 'dpaste_de.urls' | ||||
| 90 | |||||
| 91 | TEMPLATE_DIRS = ( | ||||
| 87fb15db » | martin@mahner.org | 2008-08-07 | 92 | os.path.join(PROJECT_ROOT, 'templates'), | |
| 8aad67be » | martin@mahner.org | 2008-08-07 | 93 | ) | |
| 94 | |||||
| 95 | INSTALLED_APPS = ( | ||||
| 96 | 'django.contrib.auth', | ||||
| 97 | 'django.contrib.contenttypes', | ||||
| 98 | 'django.contrib.sessions', | ||||
| 99 | 'django.contrib.sites', | ||||
| 4be7783c » | martin@mahner.org | 2008-08-07 | 100 | 'django.contrib.admin', | |
| 87fb15db » | martin@mahner.org | 2008-08-07 | 101 | 'dpaste', | |
| 102 | 'mptt', | ||||
| 8aad67be » | martin@mahner.org | 2008-08-07 | 103 | ) | |
| 87fb15db » | martin@mahner.org | 2008-08-07 | 104 | ||
| 105 | TEMPLATE_CONTEXT_PROCESSORS = ( | ||||
| 106 | "django.core.context_processors.auth", | ||||
| 107 | "django.core.context_processors.debug", | ||||
| 108 | "django.core.context_processors.i18n", | ||||
| 109 | "django.core.context_processors.media", | ||||
| 110 | "django.core.context_processors.request", | ||||
| 111 | ) | ||||
| 112 | |||||
| 113 | try: | ||||
| 114 | from local_settings import * | ||||
| 115 | except ImportError: | ||||
| 116 | pass | ||||
