· 7 years ago · Aug 24, 2018, 04:52 PM
1import os
2
3# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
4BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
5
6# Quick-start development settings - unsuitable for production
7# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
8
9# SECURITY WARNING: keep the secret key used in production secret!
10SECRET_KEY = 'removed'
11
12# SECURITY WARNING: don't run with debug turned on in production!
13DEBUG = True
14
15ALLOWED_HOSTS = ['*']
16
17# Application definition
18
19INSTALLED_APPS = [
20 'home',
21 'django.contrib.admin',
22 'django.contrib.auth',
23 'django.contrib.contenttypes',
24 'django.contrib.sessions',
25 'django.contrib.messages',
26 'django.contrib.staticfiles',
27 'django.contrib.sites',
28 'photologue',
29 'sortedm2m',
30]
31
32MEDIA_ROOT = '/root/jake/temp_uploaded_images'
33MEDIA_URL = ''
34SITE_ID = 1
35
36MIDDLEWARE = [
37 'django.middleware.security.SecurityMiddleware',
38 'django.contrib.sessions.middleware.SessionMiddleware',
39 'django.middleware.common.CommonMiddleware',
40 'django.middleware.csrf.CsrfViewMiddleware',
41 'django.contrib.auth.middleware.AuthenticationMiddleware',
42 'django.contrib.messages.middleware.MessageMiddleware',
43 'django.middleware.clickjacking.XFrameOptionsMiddleware',
44]
45
46ROOT_URLCONF = 'jake_site.urls'
47
48TEMPLATES = [
49 {
50 'BACKEND': 'django.template.backends.django.DjangoTemplates',
51 'DIRS': [],
52 'APP_DIRS': True,
53 'OPTIONS': {
54 'context_processors': [
55 'django.template.context_processors.debug',
56 'django.template.context_processors.request',
57 'django.contrib.auth.context_processors.auth',
58 'django.contrib.messages.context_processors.messages',
59 ],
60 },
61 },
62]
63
64WSGI_APPLICATION = 'jake_site.wsgi.application'
65
66# Database
67# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
68
69DATABASES = {
70 'default': {
71 'ENGINE': 'django.db.backends.sqlite3',
72 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
73 }
74}
75
76
77# Password validation
78# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
79
80AUTH_PASSWORD_VALIDATORS = [
81 {
82 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
83 },
84 {
85 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
86 },
87 {
88 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
89 },
90 {
91 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
92 },
93]
94
95LANGUAGE_CODE = 'en-us'
96TIME_ZONE = 'UTC'
97USE_I18N = True
98USE_L10N = True
99USE_TZ = True
100
101STATIC_URL = '/static/'
102EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
103DEFAULT_FROM_EMAIL = 'testing@example.com'
104EMAIL_HOST_USER = ''
105EMAIL_HOST_PASSWORD = ''
106EMAIL_USE_TLS = False
107EMAIL_PORT = 1025