2015-10-03 01:07:05 +00:00
|
|
|
import os
|
|
|
|
|
2016-05-10 15:55:54 +00:00
|
|
|
import environ
|
|
|
|
env = environ.Env()
|
|
|
|
environ.Env.read_env()
|
2015-10-03 01:07:05 +00:00
|
|
|
|
|
|
|
def local_dir(entry):
|
|
|
|
return os.path.join(
|
|
|
|
os.path.dirname(os.path.dirname(__file__)),
|
|
|
|
entry
|
|
|
|
)
|
|
|
|
|
|
|
|
WSGI_APPLICATION = 'bornhack.wsgi.application'
|
|
|
|
ROOT_URLCONF = 'bornhack.urls'
|
|
|
|
|
2015-10-05 16:35:30 +00:00
|
|
|
SITE_ID = 1
|
|
|
|
|
2015-10-03 01:07:05 +00:00
|
|
|
INSTALLED_APPS = [
|
|
|
|
'django.contrib.admin',
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
2015-10-05 16:35:30 +00:00
|
|
|
'django.contrib.sites',
|
|
|
|
|
2016-02-20 22:39:02 +00:00
|
|
|
'profiles',
|
|
|
|
'camps',
|
2016-05-10 20:20:01 +00:00
|
|
|
'shop',
|
2016-05-30 19:36:14 +00:00
|
|
|
'news',
|
2016-05-30 19:51:17 +00:00
|
|
|
'utils',
|
2016-02-20 22:39:02 +00:00
|
|
|
|
2015-10-05 16:35:30 +00:00
|
|
|
'allauth',
|
|
|
|
'allauth.account',
|
|
|
|
'bootstrap3',
|
2015-10-03 01:07:05 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
STATIC_ROOT = local_dir('static')
|
2015-10-05 16:35:30 +00:00
|
|
|
STATICFILES_DIRS = [local_dir('static_src')]
|
2016-05-30 18:22:47 +00:00
|
|
|
#MEDIA_URL = '/media/'
|
|
|
|
MEDIA_ROOT = env('MEDIA_ROOT')
|
2015-10-03 01:07:05 +00:00
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
TIME_ZONE = 'UTC'
|
|
|
|
USE_I18N = True
|
|
|
|
USE_L10N = True
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
{
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
|
'DIRS': [local_dir('templates')],
|
|
|
|
'APP_DIRS': True,
|
|
|
|
'OPTIONS': {
|
|
|
|
'context_processors': [
|
|
|
|
'django.template.context_processors.debug',
|
|
|
|
'django.template.context_processors.request',
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
2016-05-06 20:33:59 +00:00
|
|
|
'camps.context_processors.current_camp',
|
2016-05-14 17:39:34 +00:00
|
|
|
'shop.context_processors.current_order',
|
2016-05-30 22:58:11 +00:00
|
|
|
'shop.context_processors.user_has_tickets',
|
2015-10-03 01:07:05 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = [
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
]
|
2015-10-05 16:35:30 +00:00
|
|
|
|
|
|
|
LOGIN_REDIRECT_URL = 'profiles:detail'
|
|
|
|
|
|
|
|
AUTHENTICATION_BACKENDS = (
|
|
|
|
'django.contrib.auth.backends.ModelBackend', # Login to admin with username
|
|
|
|
'allauth.account.auth_backends.AuthenticationBackend',
|
|
|
|
)
|
|
|
|
|
|
|
|
ACCOUNT_AUTHENTICATION_METHOD = 'email'
|
|
|
|
ACCOUNT_EMAIL_REQUIRED = True
|
|
|
|
ACCOUNT_EMAIL_VERIFICATION = True
|
2016-02-20 02:00:08 +00:00
|
|
|
ACCOUNT_EMAIL_SUBJECT_PREFIX = '[bornhack] '
|
2015-10-05 16:35:30 +00:00
|
|
|
ACCOUNT_USERNAME_REQUIRED = False
|
2016-06-01 13:46:14 +00:00
|
|
|
LOGIN_REDIRECT_URL='/shop/'
|
2015-10-05 16:35:30 +00:00
|
|
|
LOGIN_URL = '/login/'
|
2016-04-25 17:08:55 +00:00
|
|
|
|
|
|
|
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
|
2016-05-06 20:51:07 +00:00
|
|
|
|
|
|
|
BOOTSTRAP3 = {
|
2016-05-06 21:30:07 +00:00
|
|
|
'jquery_url': '/static/js/jquery.min.js',
|
|
|
|
'javascript_url': '/static/js/bootstrap.min.js'
|
2016-05-06 20:51:07 +00:00
|
|
|
}
|
2016-05-10 15:55:54 +00:00
|
|
|
|
|
|
|
EPAY_MERCHANT_NUMBER = env('EPAY_MERCHANT_NUMBER')
|
|
|
|
EPAY_MD5_SECRET = env('EPAY_MD5_SECRET')
|
2016-05-25 18:05:31 +00:00
|
|
|
|
2016-05-29 08:55:55 +00:00
|
|
|
TICKET_CATEGORY_ID = env('TICKET_CATEGORY_ID')
|
|
|
|
|
|
|
|
COINIFY_API_KEY = env('COINIFY_API_KEY')
|
|
|
|
COINIFY_API_SECRET = env('COINIFY_API_SECRET')
|
2016-05-31 18:47:14 +00:00
|
|
|
COINIFY_IPN_SECRET = env('COINIFY_IPN_SECRET')
|
2016-05-30 14:58:55 +00:00
|
|
|
|
2016-05-30 16:49:53 +00:00
|
|
|
LETTERHEAD_PDF_PATH = os.path.join(local_dir('static_src'), 'pdf', env('PDF_LETTERHEAD_FILENAME'))
|
2016-05-30 18:35:48 +00:00
|
|
|
PDF_ARCHIVE_PATH='/usr/local/www/pdf_archive/'
|
2016-06-01 07:29:21 +00:00
|
|
|
|
|
|
|
BANKACCOUNT_IBAN = env('BANKACCOUNT_IBAN')
|
|
|
|
BANKACCOUNT_SWIFTBIC = env('BANKACCOUNT_SWIFTBIC')
|
2016-06-01 14:48:33 +00:00
|
|
|
BANKACCOUNT_REG = env('BANKACCOUNT_REG')
|
|
|
|
BANKACCOUNT_ACCOUNT = env('BANKACCOUNT_ACCOUNT')
|