### BASE CONFIGURATION import os.path import posixpath import logging from txcommon.i18n import available_languages PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) # 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-us' 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 # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" 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/' # 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 = [] # 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]]"