### BASE CONFIGURATION

import os.path
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 = os.path.join(PROJECT_PATH, 'logs')

# 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)

# 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')

# 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/'

# 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 = '/media/'

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

