-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.py
112 lines (98 loc) · 3.21 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# -*- coding: utf-8 -*-
from getenv import env
INSTALLED_ADDONS = [
# <INSTALLED_ADDONS> # Warning: text inside the INSTALLED_ADDONS tags is auto-generated. Manual changes will be overwritten.
'aldryn-addons',
'aldryn-django',
'aldryn-django-cms',
'djangocms-bootstrap4',
'djangocms-file',
'djangocms-link',
'djangocms-picture',
'djangocms-snippet',
'djangocms-style',
'djangocms-text-ckeditor',
'djangocms-transfer',
'django-filer',
# </INSTALLED_ADDONS>
]
import aldryn_addons.settings
aldryn_addons.settings.load(locals())
USE_TZ = True
USE_L10N = True
TIME_ZONE = 'America/Mexico_City'
CMS_TEMPLATES = (
('home.html', 'Home'),
('category.html', 'Category'),
('category_iframe.html', 'iFrame'),
('index_iframe_template.html', 'resumen_template'),
)
CMS_LANGUAGES = {
'default': {
'fallbacks': ['es', 'en'],
'redirect_on_fallback': False,
'public': True,
'hide_untranslated': True,
},
1: [
{'code': 'es', 'name': 'Spanish', 'fallbacks': [], 'public': True},
{'code': 'en', 'name': 'English', 'fallbacks': [], 'public': True},
]
}
CMS_PAGE_CACHE = True
# all django settings can be altered here
ENABLE_SYNCING = False
STATIC_ROOT = '/static'
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
INSTALLED_APPS.extend([
# Third party
'account',
'account_extensions',
'core',
'leads',
'schedule',
'sponsors',
])
DJANGOCMS_FILE_TEMPLATES = [
('button', 'With button'),
]
MIDDLEWARE.insert(
MIDDLEWARE.index('django.middleware.locale.LocaleMiddleware') + 1,
'cms_extensions.middleware.LanguageCookieMiddleware',
)
MIDDLEWARE.remove('cms.middleware.language.LanguageCookieMiddleware')
# Captcha
if env('RECAPTCHA_PUBLIC_KEY') and env('RECAPTCHA_PRIVATE_KEY'):
RECAPTCHA_PUBLIC_KEY = env('RECAPTCHA_PUBLIC_KEY')
RECAPTCHA_PRIVATE_KEY = env('RECAPTCHA_PRIVATE_KEY')
else:
# Use the test keys and be quiet about it
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']
# Accounts
LOGIN_URL = 'account_login'
DEFAULT_HTTP_PROTOCOL = 'https'
ACCOUNT_LANGUAGES = (('es', 'Spanish'), ('en', 'English'))
ACCOUNT_OPEN_SIGNUP = env('ACCOUNT_OPEN_SIGNUP', default=True)
ACCOUNT_EMAIL_UNIQUE = True
ACCOUNT_LOGIN_REDIRECT_URL = 'account_dashboard'
ACCOUNT_SETTINGS_REDIRECT_URL = 'account_settings'
ACCOUNT_PASSWORD_CHANGE_REDIRECT_URL = 'account_dashboard'
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = True
ACCOUNT_EMAIL_CONFIRMATION_AUTO_LOGIN = False
ACCOUNT_USER_DISPLAY = lambda user: user.email
AUTHENTICATION_BACKENDS.append('account.auth_backends.EmailAuthenticationBackend')
def ACCOUNT_DELETION_MARK_CALLBACK(account_deletion):
# Fixes https://github.com/pinax/django-user-accounts/issues/241
from account.hooks import hookset
hookset.account_delete_expunge(account_deletion)
# Email
DEFAULT_FROM_EMAIL = 'PyLatam [email protected]'
# Reservations
HOTEL_RESERVATIONS_URLS = {
'es': 'https://secure.internetpower.com.mx/portals/Friendly/hotel/hoteldescription.aspx',
'en': 'https://secure.internetpower.com.mx/portals/FriendlyEng/hotel/hoteldescription.aspx',
}
TALK_LANGUAGES = (
('en', 'English'),
('es', 'Español'),
)