-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
65 lines (51 loc) · 1.88 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from wger.settings_global import *
from decouple import config
import dj_database_url
import os
# Use 'DEBUG = True' to get more details for server errors
DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = True
ADMINS = (
(os.environ.get('ADMIN_NAME'), os.environ.get('ADMIN_EMAIL')),
)
MANAGERS = ADMINS
if os.environ.get("DB") == 'postgresql':
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ.get('WGER_NAME') or 'wger',
'USER': os.environ.get('WGER_USER') or 'postgres',
'PASSWORD': os.environ.get('WGER_PASSWORD') or '',
'HOST': os.environ.get('WGER_HOST') or 'localhost',
'PORT': os.environ.get('WGER_PORT') or '',
}
}
if os.environ.get("DB") == "heroku":
DATABASES = {
'default': dj_database_url.config(default=config('DATABASE_URL'))
}
# Your reCaptcha keys
RECAPTCHA_PUBLIC_KEY = ''
RECAPTCHA_PRIVATE_KEY = ''
NOCAPTCHA = True
# The site's URL (e.g. http://www.my-local-gym.com or http://localhost:8000)
# This is needed for uploaded files and images (exercise images, etc.) to be
# properly served.
SITE_URL = 'http://localhost:8000'
# Path to uploaded files
# Absolute filesystem path to the directory that will hold user-uploaded files.
MEDIA_ROOT = ''
MEDIA_URL = '/media/'
# Allow all hosts to access the application. Change if used in production.
ALLOWED_HOSTS = '*'
# This might be a good idea if you setup memcached
#SESSION_ENGINE = "django.contrib.sessions.backends.cache"
# Configure a real backend in production
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Sender address used for sent emails
WGER_SETTINGS['EMAIL_FROM'] = 'wger Workout Manager <[email protected]>'
# Your twitter handle, if you have one for this instance.
#WGER_SETTINGS['TWITTER'] = ''