source: firmaeventos/FirmaEventos/default.settings.py @ 989c168

Last change on this file since 989c168 was 3996539, checked in by rudmanmrrod <rudman22@…>, 7 years ago

Renombrado utils como base, cambiado el template, quitados modelos no usados, agregado materialize

  • Property mode set to 100644
File size: 4.5 KB
Line 
1"""
2Django settings for FirmaEventos project.
3
4Generated by 'django-admin startproject' using Django 1.10.
5
6For more information on this file, see
7https://docs.djangoproject.com/en/1.10/topics/settings/
8
9For the full list of settings and their values, see
10https://docs.djangoproject.com/en/1.10/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.10/howto/deployment/checklist/
21
22# SECURITY WARNING: keep the secret key used in production secret!
23SECRET_KEY = 'n02)^6vfqa)@mi!u519=buiec223iowu4)0b8u5y7lx9vl+hq@'
24
25# SECURITY WARNING: don't run with debug turned on in production!
26DEBUG = True
27
28ALLOWED_HOSTS = []
29
30
31# Application definition
32
33DJANGO_APPS = [
34    'dal',
35    'dal_select2',
36    'django.contrib.admin',
37    'django.contrib.auth',
38    'django.contrib.contenttypes',
39    'django.contrib.sessions',
40    'django.contrib.messages',
41    'django.contrib.staticfiles',
42    'captcha',
43]
44
45PROJECT_APPS = [
46    'utils',
47    'users',
48    'eventos',
49    'participantes',
50]
51
52INSTALLED_APPS = DJANGO_APPS + PROJECT_APPS
53
54MIDDLEWARE = [
55    'django.middleware.security.SecurityMiddleware',
56    'django.contrib.sessions.middleware.SessionMiddleware',
57    'django.middleware.common.CommonMiddleware',
58    'django.middleware.csrf.CsrfViewMiddleware',
59    'django.contrib.auth.middleware.AuthenticationMiddleware',
60    'django.contrib.messages.middleware.MessageMiddleware',
61    'django.middleware.clickjacking.XFrameOptionsMiddleware',
62]
63
64ROOT_URLCONF = 'FirmaEventos.urls'
65
66#  Definir los Templates
67
68BASE_TEMPLATES = os.path.join(BASE_DIR, "templates")
69UTILS_TEMPLATES = os.path.join(BASE_DIR, "utils/templates")
70USERS_TEMPLATES = os.path.join(BASE_DIR, "users/templates")
71EVENTS_TEMPLATES = os.path.join(BASE_DIR, "eventos/templates")
72PARTIC_TEMPLATES = os.path.join(BASE_DIR, "participantes/templates")
73
74
75TEMPLATES = [
76    {
77        'BACKEND': 'django.template.backends.django.DjangoTemplates',
78        'DIRS': [
79                        BASE_TEMPLATES, UTILS_TEMPLATES,
80                        USERS_TEMPLATES, EVENTS_TEMPLATES,
81                        PARTIC_TEMPLATES
82                    ],
83        'APP_DIRS': True,
84        'OPTIONS': {
85            'context_processors': [
86                'django.template.context_processors.debug',
87                'django.template.context_processors.request',
88                'django.contrib.auth.context_processors.auth',
89                'django.contrib.messages.context_processors.messages',
90            ],
91        },
92    },
93]
94
95WSGI_APPLICATION = 'FirmaEventos.wsgi.application'
96
97
98# Database
99# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
100
101DATABASES = {
102    'default': {
103        'ENGINE': 'django.db.backends.postgresql_psycopg2',
104        'NAME': 'firma_eventos',
105        'USER': 'postgres',
106        'PASSWORD': '123456',
107        'HOST': 'localhost',
108        'PORT': '5432',
109        'ATOMIC_REQUESTS': True, # Crea transacciones en cada peticion de la vista
110    }
111}
112
113
114# Password validation
115# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
116
117AUTH_PASSWORD_VALIDATORS = [
118    {
119        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
120    },
121    {
122        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
123    },
124    {
125        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
126    },
127    {
128        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
129    },
130]
131
132
133# Internationalization
134# https://docs.djangoproject.com/en/1.10/topics/i18n/
135
136LANGUAGE_CODE = 'es-ve'
137
138LOCALE_NAME = 'es'
139
140TIME_ZONE = 'America/Caracas'
141
142USE_I18N = True
143
144USE_L10N = True
145
146USE_TZ = True
147
148MEDIA_ROOT = os.path.join(BASE_DIR, 'sources/')
149MEDIA_URL = '/sources/'
150
151# Static files (CSS, JavaScript, Images)
152# https://docs.djangoproject.com/en/1.8/howto/static-files/
153
154SOURCES_URL = BASE_DIR + 'sources/'
155STATIC_ROOT = BASE_DIR + 'static/'
156STATIC_URL = '/static/'
157
158# Configuración de los directorios en donde se encuentran los archivos estáticos
159STATICFILES_DIRS = (
160    os.path.join(BASE_DIR, 'static/'),
161    os.path.join(BASE_DIR, 'sources/'),
162)
163
164# Configuración para el logeo de usuarios
165
166LOGIN_URL = "/"
167
168LOGOUT_URL= "/logout"
169
170
171EMAIL_USE_TLS = True
172
173EMAIL_HOST = 'smtp.gmail.com'
174EMAIL_PORT = 587
175EMAIL_HOST_USER = 'pruebautana@gmail.com'
176EMAIL_HOST_PASSWORD = 'autana2016'
177EMAIL_FROM = EMAIL_HOST_USER
Note: See TracBrowser for help on using the repository browser.