blob: ee68fce5315dea0d65ce25762771199ba6b1c262 [file] [log] [blame]
Dirk Vogtf130c752016-08-23 14:45:01 +02001"""
2Django settings for hiccup_server project.
3
4Generated by 'django-admin startproject' using Django 1.9.7.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/1.9/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/1.9/ref/settings/
11"""
12
13import os
14
15# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17
18
19# Quick-start development settings - unsuitable for production
20# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = '7u+#ha3hk!x+*)clhs46%n*)w1q+5s4+yoc#1!nm0b%fwwrud@'
24
25# SECURITY WARNING: don't run with debug turned on in production!
Dirk Vogtf5a15532016-09-26 15:52:24 +020026DEBUG = False
Dirk Vogtf130c752016-08-23 14:45:01 +020027
Dirk Vogt20539e52016-08-26 11:17:35 +020028ALLOWED_HOSTS = ['*']
Dirk Vogtf130c752016-08-23 14:45:01 +020029
30
31# Application definition
32
33INSTALLED_APPS = [
34 'django.contrib.admin',
35 'django.contrib.auth',
36 'django.contrib.contenttypes',
37 'django.contrib.sessions',
38 'django.contrib.messages',
39 'django.contrib.staticfiles',
Dirk Vogt47d80ba2016-08-26 09:31:39 +020040 'rest_framework',
Dirk Vogtf130c752016-08-23 14:45:01 +020041 'crashreports',
Dirk Vogt47d80ba2016-08-26 09:31:39 +020042 'psensor',
Dirk Vogtd1345212016-09-14 14:31:45 +020043 'crispy_forms',
Dirk Vogtf5a15532016-09-26 15:52:24 +020044 'bootstrap3',
Dirk Vogtf130c752016-08-23 14:45:01 +020045]
46
47MIDDLEWARE_CLASSES = [
48 'django.middleware.security.SecurityMiddleware',
49 'django.contrib.sessions.middleware.SessionMiddleware',
50 'django.middleware.common.CommonMiddleware',
51 'django.middleware.csrf.CsrfViewMiddleware',
52 'django.contrib.auth.middleware.AuthenticationMiddleware',
53 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
54 'django.contrib.messages.middleware.MessageMiddleware',
55 'django.middleware.clickjacking.XFrameOptionsMiddleware',
56]
57
58ROOT_URLCONF = 'hiccup.urls'
59
60TEMPLATES = [
61 {
62 'BACKEND': 'django.template.backends.django.DjangoTemplates',
63 'DIRS': [],
64 'APP_DIRS': True,
65 'OPTIONS': {
66 'context_processors': [
67 'django.template.context_processors.debug',
68 'django.template.context_processors.request',
69 'django.contrib.auth.context_processors.auth',
70 'django.contrib.messages.context_processors.messages',
71 ],
72 },
73 },
74]
75
76#WSGI_APPLICATION = 'hiccup_server.wsgi.application'
77
78
79# Database
80# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
81
82DATABASES = {
83 'default': {
84 'ENGINE': 'django.db.backends.sqlite3',
85 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
86 }
87}
88
89
90# Password validation
91# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
92
93AUTH_PASSWORD_VALIDATORS = [
94 {
95 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
96 },
97 {
98 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
99 },
100 {
101 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
102 },
103 {
104 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
105 },
106]
107
108
109# Internationalization
110# https://docs.djangoproject.com/en/1.9/topics/i18n/
111
112LANGUAGE_CODE = 'en-us'
113TIME_ZONE = 'Europe/Amsterdam'
114USE_I18N = True
115USE_L10N = True
116USE_TZ = True
117
118
Dirk Vogt47d80ba2016-08-26 09:31:39 +0200119REST_FRAMEWORK = {
120 'DEFAULT_PERMISSION_CLASSES': (
121 'rest_framework.permissions.IsAuthenticated',
Dirk Vogtd1345212016-09-14 14:31:45 +0200122 ),
123 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)
Dirk Vogt47d80ba2016-08-26 09:31:39 +0200124}
125
Dirk Vogtf130c752016-08-23 14:45:01 +0200126# Static files (CSS, JavaScript, Images)
127# https://docs.djangoproject.com/en/1.9/howto/static-files/
128
129STATIC_URL = '/static/'
Dirk Vogt20539e52016-08-26 11:17:35 +0200130
131STATIC_ROOT = "/home/hiccup/static/static"