# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

TEMPLATE_CONTEXT_PROCESSORS = [
    "django.core.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.request",
    "notification.context_processors.notification",
    "staticfiles.context_processors.static_url",
]

TEMPLATE_CONTEXT_PROCESSORS += (
        'userprofile.context_processors.css_classes',
        'txcommon.context_processors.site_section',
)

MIDDLEWARE_CLASSES = [
    # Enable GZIP compression
    'django.middleware.gzip.GZipMiddleware',
    'django.middleware.common.CommonMiddleware',
    # Enable protection against Cross Site Request Forgeries
    'external.csrf.middleware.CsrfMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.doc.XViewMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
    'django_sorting.middleware.SortingMiddleware',
    'pagination.middleware.PaginationMiddleware',
]

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = [
    os.path.join(PROJECT_PATH, 'templates'),
]

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.comments',
    'django.contrib.contenttypes',
    'django.contrib.flatpages',
    'django.contrib.markup',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admindocs',
    'notification',
    'django_filters',
    'django_sorting',
    'south',
    'tagging',
    'pagination',
    'piston',
    'contact_form',
    'ajax_select',
    'threadedcomments',
    'staticfiles',
    'authority',
    # Transifex specific apps:
    'txcommon',
    # It's comming here due http://trac.transifex.org/ticket/596
    'userprofile',
    'codebases', # need to be before vcs
    'vcs',
    'translations',
    'languages',
    'projects',
    'releases',
    'actionlog',
    'reviews',
    'tarball',
    'submissions',
    'webtrans',
    'txpermissions',
    'teams',
    # Must come in the end
    'django_addons',
    # Extra bits:
    'txcollections', # Kept for compatibility reasons, to make migrations work
]

COMMENTS_APP = 'threadedcomments'
