blob: 349a47b3b4ad6e257d1dc7692266b68a786f7aad [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!
26DEBUG = True
27
28ALLOWED_HOSTS = []
29
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 Vogtf130c752016-08-23 14:45:01 +020043]
44
45MIDDLEWARE_CLASSES = [
46 'django.middleware.security.SecurityMiddleware',
47 'django.contrib.sessions.middleware.SessionMiddleware',
48 'django.middleware.common.CommonMiddleware',
49 'django.middleware.csrf.CsrfViewMiddleware',
50 'django.contrib.auth.middleware.AuthenticationMiddleware',
51 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
52 'django.contrib.messages.middleware.MessageMiddleware',
53 'django.middleware.clickjacking.XFrameOptionsMiddleware',
54]
55
56ROOT_URLCONF = 'hiccup.urls'
57
58TEMPLATES = [
59 {
60 'BACKEND': 'django.template.backends.django.DjangoTemplates',
61 'DIRS': [],
62 'APP_DIRS': True,
63 'OPTIONS': {
64 'context_processors': [
65 'django.template.context_processors.debug',
66 'django.template.context_processors.request',
67 'django.contrib.auth.context_processors.auth',
68 'django.contrib.messages.context_processors.messages',
69 ],
70 },
71 },
72]
73
74#WSGI_APPLICATION = 'hiccup_server.wsgi.application'
75
76
77# Database
78# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
79
80DATABASES = {
81 'default': {
82 'ENGINE': 'django.db.backends.sqlite3',
83 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
84 }
85}
86
87
88# Password validation
89# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
90
91AUTH_PASSWORD_VALIDATORS = [
92 {
93 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
94 },
95 {
96 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
97 },
98 {
99 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
100 },
101 {
102 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
103 },
104]
105
106
107# Internationalization
108# https://docs.djangoproject.com/en/1.9/topics/i18n/
109
110LANGUAGE_CODE = 'en-us'
111TIME_ZONE = 'Europe/Amsterdam'
112USE_I18N = True
113USE_L10N = True
114USE_TZ = True
115
116
Dirk Vogt47d80ba2016-08-26 09:31:39 +0200117REST_FRAMEWORK = {
118 'DEFAULT_PERMISSION_CLASSES': (
119 'rest_framework.permissions.IsAuthenticated',
120 )
121}
122
Dirk Vogtf130c752016-08-23 14:45:01 +0200123# Static files (CSS, JavaScript, Images)
124# https://docs.djangoproject.com/en/1.9/howto/static-files/
125
126STATIC_URL = '/static/'