· 7 years ago · Sep 02, 2018, 01:10 PM
1"""
2Django settings for mysite project.
3
4Generated by 'django-admin startproject' using Django 1.9.
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__)))
17LOGIN_REDIRECT_URL='/sitename/'
18LOGOUT_REDIRECT_URL='/sitename/'
19MEDIA_ROOT = "/home/kuba/mysite/media/"
20MEDIA_URL = '/media/'
21
22
23# Quick-start development settings - unsuitable for production
24# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
25
26# SECURITY WARNING: keep the secret key used in production secret!
27SECRET_KEY = ''
28
29# SECURITY WARNING: don't run with debug turned on in production!
30DEBUG = True
31
32ALLOWED_HOSTS = []
33
34
35# Application definition
36
37INSTALLED_APPS = [
38 'personal',
39 'sitename',
40 'django.contrib.admin',
41 'django.contrib.auth',
42 'django.contrib.contenttypes',
43 'django.contrib.sessions',
44 'django.contrib.messages',
45 'django.contrib.staticfiles',
46]
47
48MIDDLEWARE = [
49 'django.middleware.security.SecurityMiddleware',
50 'django.contrib.sessions.middleware.SessionMiddleware',
51 'django.middleware.common.CommonMiddleware',
52 'django.middleware.csrf.CsrfViewMiddleware',
53 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 'django.contrib.messages.middleware.MessageMiddleware',
55 'django.middleware.clickjacking.XFrameOptionsMiddleware',
56]
57
58ROOT_URLCONF = 'mysite.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
76WSGI_APPLICATION = 'mysite.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 = 'PL-pl'
113
114TIME_ZONE = 'UTC'
115
116USE_I18N = True
117
118USE_L10N = True
119
120USE_TZ = True
121
122
123# Static files (CSS, JavaScript, Images)
124# https://docs.djangoproject.com/en/1.9/howto/static-files/
125
126STATIC_URL = '/static/'