1 | """ |
---|
2 | Django settings for FirmaEventos project. |
---|
3 | |
---|
4 | Generated by 'django-admin startproject' using Django 1.10. |
---|
5 | |
---|
6 | For more information on this file, see |
---|
7 | https://docs.djangoproject.com/en/1.10/topics/settings/ |
---|
8 | |
---|
9 | For the full list of settings and their values, see |
---|
10 | https://docs.djangoproject.com/en/1.10/ref/settings/ |
---|
11 | """ |
---|
12 | |
---|
13 | import os |
---|
14 | |
---|
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
---|
16 | BASE_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! |
---|
23 | SECRET_KEY = 'n02)^6vfqa)@mi!u519=buiec223iowu4)0b8u5y7lx9vl+hq@' |
---|
24 | |
---|
25 | # SECURITY WARNING: don't run with debug turned on in production! |
---|
26 | DEBUG = True |
---|
27 | |
---|
28 | ALLOWED_HOSTS = [] |
---|
29 | |
---|
30 | |
---|
31 | # Application definition |
---|
32 | |
---|
33 | DJANGO_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 | |
---|
45 | PROJECT_APPS = [ |
---|
46 | 'base', |
---|
47 | 'users', |
---|
48 | 'eventos', |
---|
49 | 'participantes', |
---|
50 | ] |
---|
51 | |
---|
52 | INSTALLED_APPS = DJANGO_APPS + PROJECT_APPS |
---|
53 | |
---|
54 | MIDDLEWARE = [ |
---|
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 | |
---|
64 | ROOT_URLCONF = 'FirmaEventos.urls' |
---|
65 | |
---|
66 | # Definir los Templates |
---|
67 | |
---|
68 | |
---|
69 | TEMPLATES = [ |
---|
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 | |
---|
85 | WSGI_APPLICATION = 'FirmaEventos.wsgi.application' |
---|
86 | |
---|
87 | |
---|
88 | # Database |
---|
89 | # https://docs.djangoproject.com/en/1.8/ref/settings/#databases |
---|
90 | |
---|
91 | DATABASES = { |
---|
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 | |
---|
107 | AUTH_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 | |
---|
126 | LANGUAGE_CODE = 'es-ve' |
---|
127 | |
---|
128 | LOCALE_NAME = 'es' |
---|
129 | |
---|
130 | TIME_ZONE = 'America/Caracas' |
---|
131 | |
---|
132 | USE_I18N = True |
---|
133 | |
---|
134 | USE_L10N = True |
---|
135 | |
---|
136 | USE_TZ = True |
---|
137 | |
---|
138 | MEDIA_ROOT = os.path.join(BASE_DIR, 'sources/') |
---|
139 | MEDIA_URL = '/sources/' |
---|
140 | |
---|
141 | # Static files (CSS, JavaScript, Images) |
---|
142 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ |
---|
143 | |
---|
144 | SOURCES_URL = BASE_DIR + 'sources/' |
---|
145 | STATIC_ROOT = BASE_DIR + 'static/' |
---|
146 | STATIC_URL = '/static/' |
---|
147 | |
---|
148 | # Configuración de los directorios en donde se encuentran los archivos estáticos |
---|
149 | STATICFILES_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 | |
---|
156 | LOGIN_URL = "/" |
---|
157 | |
---|
158 | LOGOUT_URL= "/logout" |
---|
159 | |
---|
160 | |
---|
161 | EMAIL_USE_TLS = True |
---|
162 | |
---|
163 | EMAIL_HOST = 'smtp.gmail.com' |
---|
164 | EMAIL_PORT = 587 |
---|
165 | EMAIL_HOST_USER = 'pruebautana@gmail.com' |
---|
166 | EMAIL_HOST_PASSWORD = 'autana2016' |
---|
167 | EMAIL_FROM = EMAIL_HOST_USER |
---|