|
2 | 2 | Django settings for issue_tracker project.
|
3 | 3 |
|
4 | 4 | Generated by 'django-admin startproject' using Django 1.11.24.
|
5 |
| -
|
6 |
| -For more information on this file, see |
7 |
| -https://docs.djangoproject.com/en/1.11/topics/settings/ |
8 |
| -
|
9 |
| -For the full list of settings and their values, see |
10 |
| -https://docs.djangoproject.com/en/1.11/ref/settings/ |
11 | 5 | """
|
12 | 6 |
|
13 | 7 | import os
|
|
16 | 10 |
|
17 | 11 | if os.environ.get('DEVELOPMENT'):
|
18 | 12 | development = True
|
| 13 | + print('DEVELOPMENT=TRUE') |
19 | 14 | else:
|
20 | 15 | development = False
|
| 16 | + print('DEVELOPMENT=FALSE') |
21 | 17 |
|
22 | 18 |
|
23 | 19 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
24 | 20 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
25 | 21 |
|
26 |
| - |
27 |
| -# Quick-start development settings - unsuitable for production |
28 |
| -# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ |
29 |
| - |
30 | 22 | # SECURITY WARNING: keep the secret key used in production secret!
|
31 | 23 | SECRET_KEY = os.environ.get('SECRET_KEY')
|
32 | 24 |
|
33 |
| -# SECURITY WARNING: don't run with debug turned on in production! |
34 |
| -DEBUG = development |
| 25 | +# DEBUG = development |
| 26 | +DEBUG = True |
35 | 27 |
|
36 |
| -ALLOWED_HOSTS = ['http://localhost:8000/', |
| 28 | +ALLOWED_HOSTS = ['localhost', |
37 | 29 | os.environ.get('HOSTNAME'),
|
38 | 30 | ]
|
39 | 31 |
|
40 | 32 | # Application definition
|
41 |
| - |
42 | 33 | INSTALLED_APPS = [
|
43 | 34 | 'django.contrib.admin',
|
44 | 35 | 'django.contrib.auth',
|
|
92 | 83 | # Database
|
93 | 84 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
94 | 85 | if development:
|
95 |
| - # sqlite3 |
| 86 | + print('DATABASE: SQLITE3') |
96 | 87 | DATABASES = {
|
97 | 88 | 'default': {
|
98 | 89 | 'ENGINE': 'django.db.backends.sqlite3',
|
99 | 90 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
100 | 91 | }
|
101 | 92 | }
|
102 | 93 | else:
|
103 |
| - # Postgresql |
| 94 | + print('DATABASE: POSTGRESQL') |
104 | 95 | DATABASES = {
|
105 | 96 | 'default': dj_database_url.parse(os.environ.get('DATABASE_URL'))
|
106 | 97 | }
|
|
0 commit comments