Sophie

Sophie

distrib > Mandriva > current > i586 > by-pkgid > 0ef1481eea19479c9a9893ef2b4634f1 > files > 2

transifex-1.0.0-1mdv2010.1.noarch.rpm

### BASE CONFIGURATION

import os.path
import posixpath
import logging
from txcommon.i18n import available_languages

# TX_ROOT variable is defined/overridden in settings.py.

# Transifex can also be run from another "project" dir. To do so,
# define the PROJECT_PATH in the project's dir and point TX_ROOT
# to the directory holding the transifex source code.

try:
    PROJECT_PATH
except NameError:
    PROJECT_PATH = TX_ROOT

# Logging level/verbosity.
# Choices: logging.DEBUG (default), .INFO, .WARNING, .ERROR, .CRITICAL
LOG_LEVEL = logging.DEBUG

# Path for the log file
LOG_PATH = "/var/log/transifex"

# Logging settings
if os.path.isdir(LOG_PATH):
    logging.basicConfig(
        level = LOG_LEVEL,
        format = '%(asctime)s %(levelname)s %(message)s',
        filename = os.path.join(LOG_PATH, 'transifex.log'),
        filemode = 'a+'
    )

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en'

LOCALE_PATHS = (os.path.join(PROJECT_PATH, 'locale/'),)

# Take the languages automatically from the correct places
LANGUAGES = available_languages(LOCALE_PATHS[0])
LANGUAGES.append((LANGUAGE_CODE,LANGUAGE_CODE))
LANGUAGES.sort()

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# The absolute path to the directory that holds static files
STATIC_ROOT = os.path.join(PROJECT_PATH, 'site_media/static/')

# URL that handles the files served from STATIC_ROOT
STATIC_URL = '/site_media/static/'

STATICFILES_DIRS = [
    ('', os.path.join(PROJECT_PATH, 'media')),
]

# A sequence of directory names to be used when searching for media files 
# in installed apps, e.g. if an app has its media files in <app>/media use
STATICFILES_MEDIA_DIRNAMES = ['media']

# A sequence of app paths that should be prefixed with the label name. 
# For example, django.contrib.admin media files should be served from 
# admin/[js,css,images] rather than the media files getting served directly
# from the static root.
STATICFILES_PREPEND_LABEL_APPS = []

# Absolute path to the directory that holds media.
# This is targeted for dynamically-produced static media, such as file
# uploads, avatars, etc.
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'site_media/media/')

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
# NOTE: Also, this is hard-coded in the base.html template, so that the 500
# error page works. You'll need to change the occurrences in that file too.
MEDIA_URL = '/site_media/media/'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = posixpath.join(STATIC_URL, "admin/")

# Make this unique, and don't share it with anybody.
SECRET_KEY = r"[[SECRETKEY]]"