· 7 years ago · Apr 18, 2018, 03:12 PM
1# settings.py
2
3"""
4Django settings for ProiectTI project.
5
6Generated by 'django-admin startproject' using Django 1.11.11.
7
8For more information on this file, see
9https://docs.djangoproject.com/en/1.11/topics/settings/
10
11For the full list of settings and their values, see
12https://docs.djangoproject.com/en/1.11/ref/settings/
13"""
14
15import os
16
17# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
18BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
19
20
21# Quick-start development settings - unsuitable for production
22# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
23
24# SECURITY WARNING: keep the secret key used in production secret!
25SECRET_KEY = '#uu6b%wc$$h658g#!@g^zf=5qjq7t4#h7#56pqhwk0&q-q-&a8'
26
27# SECURITY WARNING: don't run with debug turned on in production!
28DEBUG = True
29
30ALLOWED_HOSTS = []
31
32# Application definition
33
34INSTALLED_APPS = [
35 'django.contrib.admin',
36 'django.contrib.auth',
37 'django.contrib.contenttypes',
38 'django.contrib.sessions',
39 'django.contrib.messages',
40 'django.contrib.staticfiles',
41 'my_app',
42]
43
44MIDDLEWARE = [
45 'django.middleware.security.SecurityMiddleware',
46 'django.contrib.sessions.middleware.SessionMiddleware',
47 'django.middleware.common.CommonMiddleware',
48 'django.middleware.csrf.CsrfViewMiddleware',
49 'django.contrib.auth.middleware.AuthenticationMiddleware',
50 'django.contrib.messages.middleware.MessageMiddleware',
51 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52]
53
54ROOT_URLCONF = 'ProiectTI.urls'
55
56TEMPLATES = [
57 {
58 'BACKEND': 'django.template.backends.django.DjangoTemplates',
59 'DIRS': [os.path.join(BASE_DIR, 'templates')],
60 'APP_DIRS': True,
61 'OPTIONS': {
62 'context_processors': [
63 'django.template.context_processors.debug',
64 'django.template.context_processors.request',
65 'django.contrib.auth.context_processors.auth',
66 'django.contrib.messages.context_processors.messages',
67 ],
68 },
69 },
70]
71
72WSGI_APPLICATION = 'ProiectTI.wsgi.application'
73
74
75# Database
76# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
77
78DATABASES = {
79 #Here i deleted the content because i had the user and password from my remote database
80}
81
82
83# Password validation
84# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
85
86AUTH_PASSWORD_VALIDATORS = [
87
88]
89
90
91# Internationalization
92# https://docs.djangoproject.com/en/1.11/topics/i18n/
93
94LANGUAGE_CODE = 'en-us'
95
96TIME_ZONE = 'UTC'
97
98USE_I18N = True
99
100USE_L10N = True
101
102USE_TZ = True
103
104
105# Static files (CSS, JavaScript, Images)
106# https://docs.djangoproject.com/en/1.11/howto/static-files/
107
108STATIC_URL = '/static/'
109
110LOGIN_REDIRECT_URL = 'home'
111LOGOUT_REDIRECT_URL = 'home'
112
113EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
114EMAIL_HOST = 'localhost'
115EMAIL_PORT = 25
116EMAIL_HOST_USER = ''
117EMAIL_HOST_PASSWORD = ''
118EMAIL_USE_TLS = False
119DEFAULT_FROM_EMAIL = 'Server <server@whatever.com>'