source: firmaeventos/FirmaEventos/default.settings.py @ 16cf088

Last change on this file since 16cf088 was 3397a08, checked in by lhernandez <lhernandez@…>, 7 years ago

Realizando formulario para el registro de eventos

  • Property mode set to 100644
File size: 4.0 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    'base',
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
68
69TEMPLATES = [
70    {
71        'BACKEND': 'django.template.backends.django.DjangoTemplates',
72        'DIRS': [],
73        'APP_DIRS': True,
74        'OPTIONS': {
75            'context_processors': [
76                'django.template.context_processors.debug',
77                'django.template.context_processors.request',
78                'django.contrib.auth.context_processors.auth',
79                'django.contrib.messages.context_processors.messages',
80            ],
81        },
82    },
83]
84
85WSGI_APPLICATION = 'FirmaEventos.wsgi.application'
86
87
88# Database
89# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
90
91DATABASES = {
92    'default': {
93        'ENGINE': 'django.db.backends.postgresql_psycopg2',
94        'NAME': 'firma_eventos',
95        'USER': 'postgres',
96        'PASSWORD': '123456',
97        'HOST': 'localhost',
98        'PORT': '5432',
99        'ATOMIC_REQUESTS': True, # Crea transacciones en cada peticion de la vista
100    }
101}
102
103
104# Password validation
105# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
106
107AUTH_PASSWORD_VALIDATORS = [
108    {
109        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
110    },
111    {
112        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
113    },
114    {
115        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
116    },
117    {
118        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
119    },
120]
121
122
123# Internationalization
124# https://docs.djangoproject.com/en/1.10/topics/i18n/
125
126LANGUAGE_CODE = 'es-ve'
127
128LOCALE_NAME = 'es'
129
130TIME_ZONE = 'America/Caracas'
131
132USE_I18N = True
133
134USE_L10N = True
135
136USE_TZ = True
137
138MEDIA_ROOT = os.path.join(BASE_DIR, 'sources/')
139MEDIA_URL = '/sources/'
140
141# Static files (CSS, JavaScript, Images)
142# https://docs.djangoproject.com/en/1.8/howto/static-files/
143
144SOURCES_URL = BASE_DIR + 'sources/'
145STATIC_ROOT = BASE_DIR + 'static/'
146STATIC_URL = '/static/'
147
148# Configuración de los directorios en donde se encuentran los archivos estáticos
149STATICFILES_DIRS = (
150    os.path.join(BASE_DIR, 'static/'),
151    os.path.join(BASE_DIR, 'sources/'),
152)
153
154# Configuración para el logeo de usuarios
155
156LOGIN_URL = "/"
157
158LOGOUT_URL= "/logout"
159
160
161EMAIL_USE_TLS = True
162
163EMAIL_HOST = 'smtp.gmail.com'
164EMAIL_PORT = 587
165EMAIL_HOST_USER = 'pruebautana@gmail.com'
166EMAIL_HOST_PASSWORD = 'autana2016'
167EMAIL_FROM = EMAIL_HOST_USER
Note: See TracBrowser for help on using the repository browser.