web/hdalab/settings.py
changeset 266 825ff4d6a8ac
parent 203 00fc169cc6a9
child 267 24ff98f2a122
equal deleted inserted replaced
203:00fc169cc6a9 266:825ff4d6a8ac
     1 # -*- coding: utf-8 -*-
       
     2 # Django settings for hdalab project.
       
     3 
       
     4 DEBUG = True
       
     5 TEMPLATE_DEBUG = DEBUG
       
     6 
       
     7 ADMINS = (
       
     8     # ('Your Name', 'your_email@example.com'),
       
     9 )
       
    10 
       
    11 MANAGERS = ADMINS
       
    12 
       
    13 DATABASES = {
       
    14     'default': {
       
    15         'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
       
    16         'NAME': '',                      # Or path to database file if using sqlite3.
       
    17         'USER': '',                      # Not used with sqlite3.
       
    18         'PASSWORD': '',                  # Not used with sqlite3.
       
    19         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
       
    20         'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
       
    21     }
       
    22 }
       
    23 
       
    24 # Local time zone for this installation. Choices can be found here:
       
    25 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
       
    26 # although not all choices may be available on all operating systems.
       
    27 # On Unix systems, a value of None will cause Django to use the same
       
    28 # timezone as the operating system.
       
    29 # If running in a Windows environment this must be set to the same as your
       
    30 # system time zone.
       
    31 TIME_ZONE = 'America/Chicago'
       
    32 
       
    33 # Language code for this installation. All choices can be found here:
       
    34 # http://www.i18nguy.com/unicode/language-identifiers.html
       
    35 LANGUAGE_CODE = 'fr-fr'
       
    36 
       
    37 ugettext = lambda s:s
       
    38 
       
    39 LANGUAGES = (
       
    40   ('fr', ugettext('French')),
       
    41   ('en', ugettext('English')),
       
    42   ('it', ugettext('Italian')),
       
    43   ('de', ugettext('German')),
       
    44   ('es', ugettext('Spanish')),
       
    45   ('ja', ugettext('Japanese')),
       
    46   #('zh-tw', ugettext('Chinese')),
       
    47 )
       
    48 
       
    49 SITE_ID = 1
       
    50 
       
    51 # If you set this to False, Django will make some optimizations so as not
       
    52 # to load the internationalization machinery.
       
    53 USE_I18N = True
       
    54 
       
    55 # If you set this to False, Django will not format dates, numbers and
       
    56 # calendars according to the current locale
       
    57 USE_L10N = True
       
    58 
       
    59 # Absolute filesystem path to the directory that will hold user-uploaded files.
       
    60 # Example: "/home/media/media.lawrence.com/media/"
       
    61 MEDIA_ROOT = ''
       
    62 
       
    63 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
       
    64 # trailing slash.
       
    65 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
       
    66 MEDIA_URL = ''
       
    67 
       
    68 # Absolute path to the directory static files should be collected to.
       
    69 # Don't put anything in this directory yourself; store your static files
       
    70 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
       
    71 # Example: "/home/media/media.lawrence.com/static/"
       
    72 STATIC_ROOT = ''
       
    73 
       
    74 # URL prefix for static files.
       
    75 # Example: "http://media.lawrence.com/static/"
       
    76 STATIC_URL = '/static/'
       
    77 
       
    78 # URL prefix for admin static files -- CSS, JavaScript and images.
       
    79 # Make sure to use a trailing slash.
       
    80 # Examples: "http://foo.com/static/admin/", "/static/admin/".
       
    81 #ADMIN_MEDIA_PREFIX = '/static/admin/'
       
    82 
       
    83 # Additional locations of static files
       
    84 STATICFILES_DIRS = (
       
    85     # Put strings here, like "/home/html/static" or "C:/www/django/static".
       
    86     # Always use forward slashes, even on Windows.
       
    87     # Don't forget to use absolute paths, not relative paths.
       
    88 )
       
    89 
       
    90 # List of finder classes that know how to find static files in
       
    91 # various locations.
       
    92 STATICFILES_FINDERS = (
       
    93     'django.contrib.staticfiles.finders.FileSystemFinder',
       
    94     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
       
    95 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
       
    96 )
       
    97 
       
    98 # Make this unique, and don't share it with anybody.
       
    99 SECRET_KEY = 'u!@fo&-)d-hqz7==jmc2*_^__wod8$k^lb7^)y@ihbok)gn4fe'
       
   100 
       
   101 # List of callables that know how to import templates from various sources.
       
   102 TEMPLATE_LOADERS = (
       
   103     'django.template.loaders.filesystem.Loader',
       
   104     'django.template.loaders.app_directories.Loader',
       
   105 #     'django.template.loaders.eggs.Loader',
       
   106 )
       
   107 
       
   108 MIDDLEWARE_CLASSES = (
       
   109     'django.contrib.sessions.middleware.SessionMiddleware',
       
   110     'django.middleware.locale.LocaleMiddleware',
       
   111     'django.middleware.common.CommonMiddleware',
       
   112     'django.middleware.csrf.CsrfViewMiddleware',
       
   113     'django.contrib.auth.middleware.AuthenticationMiddleware',
       
   114     'django.contrib.messages.middleware.MessageMiddleware',
       
   115 )
       
   116 
       
   117 ROOT_URLCONF = 'hdalab.urls'
       
   118 
       
   119 TEMPLATE_DIRS = (
       
   120     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
       
   121     # Always use forward slashes, even on Windows.
       
   122     # Don't forget to use absolute paths, not relative paths.
       
   123 )
       
   124 
       
   125 INSTALLED_APPS = (
       
   126     'south',
       
   127     'django.contrib.auth',
       
   128     'django.contrib.contenttypes',
       
   129     'django.contrib.sessions',
       
   130     'django.contrib.sites',
       
   131     'django.contrib.messages',
       
   132     'django.contrib.staticfiles',
       
   133     'django.contrib.admin',
       
   134     'django_extensions',
       
   135     'hdabo',
       
   136     'hdalab',
       
   137 )
       
   138 
       
   139 # A sample logging configuration. The only tangible logging
       
   140 # performed by this configuration is to send an email to
       
   141 # the site admins on every HTTP 500 error.
       
   142 # See http://docs.djangoproject.com/en/dev/topics/logging for
       
   143 # more details on how to customize your logging configuration.
       
   144 #LOGGING = {
       
   145 #    'version': 1,
       
   146 #    'disable_existing_loggers': False,
       
   147 #    'handlers': {
       
   148 #        'mail_admins': {
       
   149 #            'level': 'ERROR',
       
   150 #            'class': 'django.utils.log.AdminEmailHandler'
       
   151 #        }
       
   152 #    },
       
   153 #    'loggers': {
       
   154 #        'django.request': {
       
   155 #            'handlers': ['mail_admins'],
       
   156 #            'level': 'ERROR',
       
   157 #            'propagate': True,
       
   158 #        },
       
   159 #    }
       
   160 #}
       
   161 
       
   162 HAYSTACK_SITECONF = 'hdabo.search.sites'
       
   163 HAYSTACK_SEARCH_ENGINE = 'hdabo.search.french_whoosh'
       
   164 #HAYSTACK_WHOOSH_PATH = os.path.abspath(BASE_DIR + "../index/").rstrip("/") + "/"
       
   165 
       
   166 WIKIPEDIA_API_URL = "http://fr.wikipedia.org/w/api.php"
       
   167 WIKIPEDIA_VERSION_PERMALINK_TEMPLATE = "http://fr.wikipedia.org/w/index.php?oldid=%s"
       
   168 DBPEDIA_URI_TEMPLATE = "http://dbpedia.org/resource/%s"
       
   169 
       
   170 LOCALE_PATHS = ()
       
   171 
       
   172 from hdalab.config import * #@UnusedWildImport
       
   173