source: firmaeventos/FirmaEventos/default.settings.py @ bf47591

Last change on this file since bf47591 was bf47591, checked in by Leonel Hernandez <leonelphm@…>, 7 years ago

Inicializando Proyecto

  • 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]
49
50INSTALLED_APPS = DJANGO_APPS + PROJECT_APPS
51
52MIDDLEWARE = [
53    'django.middleware.security.SecurityMiddleware',
54    'django.contrib.sessions.middleware.SessionMiddleware',
55    'django.middleware.common.CommonMiddleware',
56    'django.middleware.csrf.CsrfViewMiddleware',
57    'django.contrib.auth.middleware.AuthenticationMiddleware',
58    'django.contrib.messages.middleware.MessageMiddleware',
59    'django.middleware.clickjacking.XFrameOptionsMiddleware',
60]
61
62ROOT_URLCONF = 'FirmaEventos.urls'
63
64#  Definir los Templates
65
66BASE_TEMPLATES = os.path.join(BASE_DIR, "templates")
67UTILS_TEMPLATES = os.path.join(BASE_DIR, "utils/templates")
68USERS_TEMPLATES = os.path.join(BASE_DIR, "users/templates")
69EVENTS_TEMPLATES = os.path.join(BASE_DIR, "eventos/templates")
70PARTIC_TEMPLATES = os.path.join(BASE_DIR, "participantes/templates")
71
72
73TEMPLATES = [
74    {
75        'BACKEND': 'django.template.backends.django.DjangoTemplates',
76        'DIRS': [
77                        BASE_TEMPLATES, UTILS_TEMPLATES,
78                        USERS_TEMPLATES, EVENTS_TEMPLATES,
79                        PARTIC_TEMPLATES
80                    ],
81        'APP_DIRS': True,
82        'OPTIONS': {
83            'context_processors': [
84                'django.template.context_processors.debug',
85                'django.template.context_processors.request',
86                'django.contrib.auth.context_processors.auth',
87                'django.contrib.messages.context_processors.messages',
88            ],
89        },
90    },
91]
92
93WSGI_APPLICATION = 'FirmaEventos.wsgi.application'
94
95
96# Database
97# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
98
99DATABASES = {
100    'default': {
101        'ENGINE': 'django.db.backends.postgresql_psycopg2',
102        'NAME': 'firma_eventos',
103        'USER': 'postgres',
104        'PASSWORD': '123456',
105        'HOST': 'localhost',
106        'PORT': '5432',
107        'ATOMIC_REQUESTS': True, # Crea transacciones en cada peticion de la vista
108    }
109}
110
111
112# Password validation
113# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
114
115AUTH_PASSWORD_VALIDATORS = [
116    {
117        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
118    },
119    {
120        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
121    },
122    {
123        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
124    },
125    {
126        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
127    },
128]
129
130
131# Internationalization
132# https://docs.djangoproject.com/en/1.10/topics/i18n/
133
134LANGUAGE_CODE = 'es-ve'
135
136LOCALE_NAME = 'es'
137
138TIME_ZONE = 'America/Caracas'
139
140USE_I18N = True
141
142USE_L10N = True
143
144USE_TZ = True
145
146MEDIA_ROOT = os.path.join(BASE_DIR, 'sources/')
147MEDIA_URL = '/sources/'
148
149# Static files (CSS, JavaScript, Images)
150# https://docs.djangoproject.com/en/1.8/howto/static-files/
151
152SOURCES_URL = BASE_DIR + 'sources/'
153STATIC_ROOT = BASE_DIR + 'static/'
154STATIC_URL = '/static/'
155
156# Configuración de los directorios en donde se encuentran los archivos estáticos
157STATICFILES_DIRS = (
158    os.path.join(BASE_DIR, 'static/'),
159    os.path.join(BASE_DIR, 'sources/'),
160)
161
162# Configuración para el logeo de usuarios
163
164LOGIN_URL = "/"
165
166LOGOUT_URL= "/logout"
167
168
169EMAIL_USE_TLS = True
170
171EMAIL_HOST = 'smtp.gmail.com'
172EMAIL_PORT = 587
173EMAIL_HOST_USER = 'pruebautana@gmail.com'
174EMAIL_HOST_PASSWORD = 'autana2016'
175EMAIL_FROM = EMAIL_HOST_USER
Note: See TracBrowser for help on using the repository browser.