| 1 | # -*- encoding: utf-8 -*- |
|---|
| 2 | # Django settings for merengue project. |
|---|
| 3 | |
|---|
| 4 | from os import path |
|---|
| 5 | from merengue.settings import * |
|---|
| 6 | |
|---|
| 7 | ugettext = lambda s: s # dummy ugettext function, as said on django docs |
|---|
| 8 | |
|---|
| 9 | BASEDIR = path.dirname(path.abspath(__file__)) |
|---|
| 10 | |
|---|
| 11 | DEBUG = True |
|---|
| 12 | TEMPLATE_DEBUG = DEBUG |
|---|
| 13 | DEBUG_TOOLBAR = DEBUG |
|---|
| 14 | HTTP_ERRORS_DEBUG = DEBUG |
|---|
| 15 | |
|---|
| 16 | ADMINS = ( |
|---|
| 17 | ('Manuel Saelices', 'msaelices@yaco.es'), |
|---|
| 18 | ) |
|---|
| 19 | |
|---|
| 20 | MANAGERS = ADMINS |
|---|
| 21 | |
|---|
| 22 | DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
|---|
| 23 | DATABASE_NAME = 'merengueprojectorg' # Or path to database file if using sqlite3. |
|---|
| 24 | DATABASE_USER = 'merengueprojectorg' # Not used with sqlite3. |
|---|
| 25 | DATABASE_PASSWORD = '' # Not used with sqlite3. |
|---|
| 26 | DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. |
|---|
| 27 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. |
|---|
| 28 | |
|---|
| 29 | # Local time zone for this installation. Choices can be found here: |
|---|
| 30 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|---|
| 31 | # although not all choices may be available on all operating systems. |
|---|
| 32 | # If running in a Windows environment this must be set to the same as your |
|---|
| 33 | # system time zone. |
|---|
| 34 | TIME_ZONE = 'Europe/Madrid' |
|---|
| 35 | |
|---|
| 36 | # Language code for this installation. All choices can be found here: |
|---|
| 37 | # http://www.i18nguy.com/unicode/language-identifiers.html |
|---|
| 38 | LANGUAGE_CODE = 'es' |
|---|
| 39 | |
|---|
| 40 | LANGUAGES = ( |
|---|
| 41 | ('es', ugettext('Español')), |
|---|
| 42 | ('en', ugettext('English')), |
|---|
| 43 | ) |
|---|
| 44 | |
|---|
| 45 | TRANSMETA_DEFAULT_LANGUAGE = 'es' |
|---|
| 46 | |
|---|
| 47 | SITE_ID = 1 |
|---|
| 48 | SITE_REGISTER_ID = 2 |
|---|
| 49 | |
|---|
| 50 | # If you set this to False, Django will make some optimizations so as not |
|---|
| 51 | # to load the internationalization machinery. |
|---|
| 52 | USE_I18N = True |
|---|
| 53 | |
|---|
| 54 | # PostGIS extension flag |
|---|
| 55 | USE_GIS = False |
|---|
| 56 | |
|---|
| 57 | if USE_GIS: |
|---|
| 58 | INSTALLED_APPS += ('django.contrib.gis', 'merengue.places', ) |
|---|
| 59 | |
|---|
| 60 | # Absolute path to the directory that holds media. |
|---|
| 61 | # Example: "/home/media/media.lawrence.com/" |
|---|
| 62 | MEDIA_ROOT = path.join(BASEDIR, 'media/') |
|---|
| 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/" |
|---|
| 67 | MEDIA_URL = '/media/' |
|---|
| 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/". |
|---|
| 72 | ADMIN_MEDIA_PREFIX = '/admin_media/' |
|---|
| 73 | |
|---|
| 74 | # Make this unique, and don't share it with anybody. |
|---|
| 75 | SECRET_KEY = 'v$*k)ri8i*yv@yb2w!c)t#aj$o=na8u#855#wsve4!iw%u__hy' |
|---|
| 76 | |
|---|
| 77 | MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ( |
|---|
| 78 | # put here aditional middlewares |
|---|
| 79 | ) |
|---|
| 80 | |
|---|
| 81 | ROOT_URLCONF = 'merengueprojectorg.urls' |
|---|
| 82 | |
|---|
| 83 | TEMPLATE_DIRS = ( |
|---|
| 84 | path.join(BASEDIR, 'templates'), |
|---|
| 85 | ) + TEMPLATE_DIRS |
|---|
| 86 | |
|---|
| 87 | LOGIN_REDIRECT_URL = '/' |
|---|
| 88 | LOGIN_URL = '/account/login/' |
|---|
| 89 | |
|---|
| 90 | INSTALLED_APPS += ( |
|---|
| 91 | # put here your project django apps |
|---|
| 92 | ) |
|---|
| 93 | |
|---|
| 94 | REQUIRED_PLUGINS = ('news', 'rss') |
|---|
| 95 | |
|---|
| 96 | SVNDIR = path.join(BASEDIR, 'apps') |
|---|
| 97 | |
|---|
| 98 | TEST_DB_CREATION_SUFFIX = 'WITH TEMPLATE template_postgis' |
|---|
| 99 | |
|---|
| 100 | FIXTURE_DIRS = ( |
|---|
| 101 | path.join(BASEDIR, 'fixtures', 'base'), |
|---|
| 102 | ) |
|---|
| 103 | |
|---|
| 104 | FIXTURES_EXCLUDES = ( |
|---|
| 105 | 'auth.permission', |
|---|
| 106 | ) |
|---|
| 107 | |
|---|
| 108 | BUILDBOT_IP = '192.168.11.209' |
|---|
| 109 | INTERNAL_IPS = ('127.0.0.1', '80.36.82.38', BUILDBOT_IP) |
|---|
| 110 | |
|---|
| 111 | # Pagination options |
|---|
| 112 | LIMIT_URL_SPIDER_TEST = 20 |
|---|
| 113 | |
|---|
| 114 | # Overwrite options tinyMCE |
|---|
| 115 | TINYMCE_MEDIA = MEDIA_URL + "cmsutils/js/widgets/tiny_mce/" |
|---|
| 116 | |
|---|
| 117 | TINYMCE_EXTRA_MEDIA = { |
|---|
| 118 | 'js': [], |
|---|
| 119 | 'css': [], |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | SEARCHBAR_MIN_RESULTS = 5 |
|---|
| 123 | |
|---|
| 124 | LOGOUT_PROTECTED_URL_REDIRECTS = ( |
|---|
| 125 | #(r'^/regularexpresion/(.*)$', '/redirect_url'), |
|---|
| 126 | ) |
|---|
| 127 | |
|---|
| 128 | PRODUCTION_DB_URL = "" |
|---|
| 129 | PRODUCTION_DB_UPDATE_PASSWORDS = (('admin', 'admin'), ) |
|---|
| 130 | |
|---|
| 131 | # For transhette |
|---|
| 132 | ENABLE_TRANSLATION_SUGGESTIONS = False |
|---|
| 133 | |
|---|
| 134 | # For johnny cache. Johnny cache key prefix should not be the same in other projects |
|---|
| 135 | CACHE_BACKEND = 'johnny.backends.locmem:///' |
|---|
| 136 | JOHNNY_MIDDLEWARE_KEY_PREFIX = '%s-cache' % DATABASE_NAME |
|---|
| 137 | |
|---|
| 138 | DETECT_NEW_PLUGINS = False |
|---|
| 139 | DETECT_BROKEN_PLUGINS = False |
|---|
| 140 | |
|---|
| 141 | # Allow overwriting any configuration in optional settings_local.py |
|---|
| 142 | # (it can be used to set up your own database, debug and cache options, contact mails...) |
|---|
| 143 | try: |
|---|
| 144 | from settings_local import * |
|---|
| 145 | except ImportError: |
|---|
| 146 | pass |
|---|