· 7 years ago · Mar 27, 2018, 03:24 PM
1""
2Django settings for SisPro project.
3Generated by 'django-admin startproject' using Django 1.9.8.
4For more information on this file, see
5https://docs.djangoproject.com/en/1.9/topics/settings/
6For the full list of settings and their values, see
7https://docs.djangoproject.com/en/1.9/ref/settings/
8"""
9
10import os
11
12# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
13BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
14
15
16# Quick-start development settings - unsuitable for production
17# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
18
19# SECURITY WARNING: keep the secret key used in production secret!
20SECRET_KEY = 'jd4r$y$-l&-^xr47jvuwxb2e9zz=f#7y=)7wo1(=gko#$$w-to'
21
22# SECURITY WARNING: don't run with debug turned on in production!
23DEBUG = True
24
25ALLOWED_HOSTS = []
26
27
28# Application definition
29
30INSTALLED_APPS = [
31 'django.contrib.admin',
32 'django.contrib.auth',
33 'django.contrib.contenttypes',
34 'django.contrib.sessions',
35 'django.contrib.messages',
36 'django.contrib.staticfiles',
37 'procesos',
38 'personal',
39 'areas',
40 'seguridad',
41 'principal',
42 'normas',
43 'auditoria',
44 'auditores',
45 'colaboradores',
46]
47
48MIDDLEWARE_CLASSES = [
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.auth.middleware.SessionAuthenticationMiddleware',
55 'django.contrib.messages.middleware.MessageMiddleware',
56 'django.middleware.clickjacking.XFrameOptionsMiddleware',
57]
58
59ROOT_URLCONF = 'SisPro.urls'
60
61TEMPLATES = [
62 {
63 'BACKEND': 'django.template.backends.django.DjangoTemplates',
64 'DIRS': [os.path.join(BASE_DIR, "templates")],
65 'APP_DIRS': True,
66 'OPTIONS': {
67 'context_processors': [
68 'django.template.context_processors.debug',
69 'django.template.context_processors.request',
70 'django.contrib.auth.context_processors.auth',
71 'django.contrib.messages.context_processors.messages',
72 ],
73 },
74 },
75]
76
77WSGI_APPLICATION = 'SisPro.wsgi.application'
78
79
80# Database
81# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
82
83DATABASES = {
84 'default':{
85 'ENGINE': 'django.db.backends.mysql',
86 'NAME': 'sistemaprocesos',
87 'SERVER':'localhost',
88 'PORT': '',
89 'USER': 'root',
90 'PASSWORD': 'root' ,
91 'OPTIONS': {
92 "init_command": "SET foreign_key_checks = 0;",
93 'sql_mode': 'traditional',
94 },
95 }
96}
97
98
99# Password validation
100# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
101
102AUTH_PASSWORD_VALIDATORS = [
103 {
104 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
105 },
106 {
107 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
108 },
109 {
110 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
111 },
112 {
113 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
114 },
115]
116
117
118# Internationalization
119# https://docs.djangoproject.com/en/1.9/topics/i18n/
120
121LANGUAGE_CODE = 'es-ec'
122
123TIME_ZONE = 'America/Guayaquil'
124
125USE_I18N = True
126
127USE_L10N = True
128
129USE_TZ = True
130
131
132# Static files (CSS, JavaScript, Images)
133# https://docs.djangoproject.com/en/1.9/howto/static-files/
134
135STATIC_URL = '/static/'
136STATICFILES_DIRS = [
137 os.path.join(BASE_DIR, "static"),
138 '/static/',
139]
140#CONFIGURACIONES UPLOAD
141MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
142MEDIA_URL = '/media/'
143
144 Desktop version Sign out