<commit_before># -*- encoding: UTF-8 -*-
import os
from django.conf.global_settings import (TEMPLATE_CONTEXT_PROCESSORS,
    STATICFILES_FINDERS)

PROJECT_ROOT = os.path.abspath(
    os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
PROJECT_NAME = os.path.split(PROJECT_ROOT)[-1]

DEBUG = TEMPLATE_DEBUG = False
INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False}

ADMINS = ()
MANAGERS = ADMINS

EMAIL_SUBJECT_PREFIX = '[%s] ' % PROJECT_NAME

DEFAULT_FROM_EMAIL = '<EMAIL>'
SERVER_EMAIL = '<EMAIL>'

TIME_ZONE = 'Europe/Berlin'
LANGUAGE_CODE = 'en'

USE_I18N = True
USE_L10N = True

SITE_ID = 1

ugettext = lambda s: s
LANGUAGES = (
    ('de', ugettext('German')),
    ('en', ugettext('English')),
)

MEDIA_URL = '/site_media/'
STATIC_URL = '/static_media/'

STATICFILES_DIRS = (
    os.path.join(PROJECT_ROOT, 'static_media'),
)

FIXTURE_DIRS = (
    os.path.join(PROJECT_ROOT, 'fixtures'),
)

STATICFILES_FINDERS += (
    'pyconde.helpers.static.AppMediaDirectoriesFinder',
    'compressor.finders.CompressorFinder',
)

COMPRESS_CSS_FILTERS = (
    'compressor.filters.css_default.CssAbsoluteFilter',
    'compressor.filters.cssmin.CSSMinFilter',
)

COMPRESS_PRECOMPILERS = (
   ('text/less', 'lessc -x {infile} {outfile}'),
)

ROOT_URLCONF = '%s.urls' % PROJECT_NAME

INSTALLED_APPS = [
    # Skins
    'pyconde.skins.ep14',
    'pyconde.skins.default',

    'djangocms_admin_style',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.messages',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.staticfiles',
    'django.contrib.markup',
    'crispy_forms',
    'south',
    'easy_thumbnails',
    'filer',
    'compressor',
    'djangocms_text_ckeditor',  # must be before 'cms'!
    'cms',
    'cms.stacks',
    'mptt',
    'menus',
    'sekizai',
    'userprofiles',
    'userprofiles.contrib.accountverification',
    'userprofiles.contrib.emailverification',
    'userprofiles.contrib.profiles',
    'taggit',
    'haystack',
    #'tinymce', # If you want tinymce, add it in the settings.py file.
    'django_gravatar',
    'social_auth',

    'cms.plugins.inherit',
    'cms.plugins.googlemap',
    'cms.plugins.link',
    'cms.plugins.snippet',
    #'cms.plugins.twitter',
    #'cms.plugins.text',
    'cmsplugin_filer_image',
    #'cmsplugin_news',

    # Symposion apps
    'pyconde.conference',
    'pyconde.speakers',
    'pyconde.proposals',
    'pyconde.sponsorship',

    # Custom apps
    'pyconde.core',
    'pyconde.accounts',
    'pyconde.attendees',
    'pyconde.events',
    'pyconde.reviews',
    'pyconde.schedule',
    'pyconde.search',
    'pyconde.helpers',
]

try:
    import django_extensions
    INSTALLED_APPS += ['django_extensions']
except ImportError:
    pass

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'cms.middleware.page.CurrentPageMiddleware',
    'cms.middleware.user.CurrentUserMiddleware',
    'cms.middleware.toolbar.ToolbarMiddleware',
    'cms.middleware.language.LanguageCookieMiddleware',
    'social_auth.middleware.SocialAuthExceptionMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS += (
    'django.core.context_processors.debug',
    'django.core.context_processors.request',
    'sekizai.context_processors.sekizai',
    'pyconde.conference.context_processors.current_conference',
    'pyconde.reviews.context_processors.review_roles',
    'pyconde.context_processors.less_settings',
    'social_auth.context_processors.social_auth_backends',
)

TEMPLATE_DIRS = (
    os.path.join(PROJECT_ROOT, 'skins', 'default'),
    os.path.join(PROJECT_ROOT, 'skins', 'ep14'),
)

USERPROFILES_CHECK_UNIQUE_EMAIL = True
USERPROFILES_DOUBLE_CHECK_EMAIL = False
USERPROFILES_DOUBLE_CHECK_PASSWORD = True
USERPROFILES_REGISTRATION_FULLNAME = True
USERPROFILES_USE_ACCOUNT_VERIFICATION = True
USERPROFILES_USE_EMAIL_VERIFICATION = True
USERPROFILES_USE_PROFILE = True
USERPROFILES_INLINE_PROFILE_ADMIN = True
USERPROFILES_USE_PROFILE_VIEW = False
USERPROFILES_REGISTRATION_FORM = 'pyconde.accounts.forms.ProfileRegistrationForm'
USERPROFILES_PROFILE_FORM = 'pyconde.accounts.forms.ProfileForm'
USERPROFILES_EMAIL_VERIFICATION_DONE_URL = 'userprofiles_profile_change'

AUTH_PROFILE_MODULE = 'accounts.Profile'

LOGIN_ERROR_URL = '/accounts/login/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'

CMS_TEMPLATES = (
    ('cms/default.html', ugettext('Default template')),
    ('cms/start.html', ugettext('Start page template')),
    ('cms/page_templates/fullpage.html', ugettext('Full page width (schedule, ...)')),
)

# Docs at https://django-cms.readthedocs.org/en/develop/getting_started/configuration.html#cms-languages
CMS_LANGUAGES = {
    1: [
        {
            'code': 'en',
            'name': ugettext('English'),
            'public': True,
            'hide_untranslated': True,
        },
        {<commit_msg>EP-135: Set the default logged-in URL to a custom page<commit_after># -*- encoding: UTF-8 -*-
import os
from django.conf.global_settings import (TEMPLATE_CONTEXT_PROCESSORS,
    STATICFILES_FINDERS)

PROJECT_ROOT = os.path.abspath(
    os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
PROJECT_NAME = os.path.split(PROJECT_ROOT)[-1]

DEBUG = TEMPLATE_DEBUG = False
INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False}

ADMINS = ()
MANAGERS = ADMINS

EMAIL_SUBJECT_PREFIX = '[%s] ' % PROJECT_NAME

DEFAULT_FROM_EMAIL = '<EMAIL>'
SERVER_EMAIL = '<EMAIL>'

TIME_ZONE = 'Europe/Berlin'
LANGUAGE_CODE = 'en'

USE_I18N = True
USE_L10N = True

SITE_ID = 1

ugettext = lambda s: s
LANGUAGES = (
    ('de', ugettext('German')),
    ('en', ugettext('English')),
)

MEDIA_URL = '/site_media/'
STATIC_URL = '/static_media/'

STATICFILES_DIRS = (
    os.path.join(PROJECT_ROOT, 'static_media'),
)

FIXTURE_DIRS = (
    os.path.join(PROJECT_ROOT, 'fixtures'),
)

STATICFILES_FINDERS += (
    'pyconde.helpers.static.AppMediaDirectoriesFinder',
    'compressor.finders.CompressorFinder',
)

COMPRESS_CSS_FILTERS = (
    'compressor.filters.css_default.CssAbsoluteFilter',
    'compressor.filters.cssmin.CSSMinFilter',
)

COMPRESS_PRECOMPILERS = (
   ('text/less', 'lessc -x {infile} {outfile}'),
)

ROOT_URLCONF = '%s.urls' % PROJECT_NAME

INSTALLED_APPS = [
    # Skins
    'pyconde.skins.ep14',
    'pyconde.skins.default',

    'djangocms_admin_style',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.messages',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.staticfiles',
    'django.contrib.markup',
    'crispy_forms',
    'south',
    'easy_thumbnails',
    'filer',
    'compressor',
    'djangocms_text_ckeditor',  # must be before 'cms'!
    'cms',
    'cms.stacks',
    'mptt',
    'menus',
    'sekizai',
    'userprofiles',
    'userprofiles.contrib.accountverification',
    'userprofiles.contrib.emailverification',
    'userprofiles.contrib.profiles',
    'taggit',
    'haystack',
    #'tinymce', # If you want tinymce, add it in the settings.py file.
    'django_gravatar',
    'social_auth',

    'cms.plugins.inherit',
    'cms.plugins.googlemap',
    'cms.plugins.link',
    'cms.plugins.snippet',
    #'cms.plugins.twitter',
    #'cms.plugins.text',
    'cmsplugin_filer_image',
    #'cmsplugin_news',

    # Symposion apps
    'pyconde.conference',
    'pyconde.speakers',
    'pyconde.proposals',
    'pyconde.sponsorship',

    # Custom apps
    'pyconde.core',
    'pyconde.accounts',
    'pyconde.attendees',
    'pyconde.events',
    'pyconde.reviews',
    'pyconde.schedule',
    'pyconde.search',
    'pyconde.helpers',
]

try:
    import django_extensions
    INSTALLED_APPS += ['django_extensions']
except ImportError:
    pass

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'cms.middleware.page.CurrentPageMiddleware',
    'cms.middleware.user.CurrentUserMiddleware',
    'cms.middleware.toolbar.ToolbarMiddleware',
    'cms.middleware.language.LanguageCookieMiddleware',
    'social_auth.middleware.SocialAuthExceptionMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS += (
    'django.core.context_processors.debug',
    'django.core.context_processors.request',
    'sekizai.context_processors.sekizai',
    'pyconde.conference.context_processors.current_conference',
    'pyconde.reviews.context_processors.review_roles',
    'pyconde.context_processors.less_settings',
    'social_auth.context_processors.social_auth_backends',
)

TEMPLATE_DIRS = (
    os.path.join(PROJECT_ROOT, 'skins', 'default'),
    os.path.join(PROJECT_ROOT, 'skins', 'ep14'),
)

USERPROFILES_CHECK_UNIQUE_EMAIL = True
USERPROFILES_DOUBLE_CHECK_EMAIL = False
USERPROFILES_DOUBLE_CHECK_PASSWORD = True
USERPROFILES_REGISTRATION_FULLNAME = True
USERPROFILES_USE_ACCOUNT_VERIFICATION = True
USERPROFILES_USE_EMAIL_VERIFICATION = True
USERPROFILES_USE_PROFILE = True
USERPROFILES_INLINE_PROFILE_ADMIN = True
USERPROFILES_USE_PROFILE_VIEW = False
USERPROFILES_REGISTRATION_FORM = 'pyconde.accounts.forms.ProfileRegistrationForm'
USERPROFILES_PROFILE_FORM = 'pyconde.accounts.forms.ProfileForm'
USERPROFILES_EMAIL_VERIFICATION_DONE_URL = 'userprofiles_profile_change'

AUTH_PROFILE_MODULE = 'accounts.Profile'

LOGIN_ERROR_URL = '/accounts/login/'
LOGIN_REDIRECT_URL = '/accounts/welcome/'
LOGOUT_REDIRECT_URL = '/'

CMS_TEMPLATES = (
    ('cms/default.html', ugettext('Default template')),
    ('cms/start.html', ugettext('Start page template')),
    ('cms/page_templates/fullpage.html', ugettext('Full page width (schedule, ...)')),
)

# Docs at https://django-cms.readthedocs.org/en/develop/getting_started/configuration.html#cms-languages
CMS_LANGUAGES = {
    1: [
        {
            'code': 'en',
            'name': ugettext('English'),
            'public': True,
            'hide_untranslated': True,
        },
        {
{'fraction_non_alphanumeric': 0.13526155021000383, 'fraction_numerical': 0.0037227949599083618, 'mean_word_length': 4.259538152610442, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6589910', 'n_tokens_mistral': 3848, 'n_tokens_neox': 3805, 'n_words': 488}