[bf47591] | 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 = [ |
---|
[3397a08] | 46 | 'base', |
---|
[bf47591] | 47 | 'users', |
---|
[3996539] | 48 | 'eventos', |
---|
| 49 | 'participantes', |
---|
[bf47591] | 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', |
---|
[3397a08] | 72 | 'DIRS': [], |
---|
[bf47591] | 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', |
---|
[a4764f9] | 96 | 'PASSWORD': 'postgres', |
---|
[bf47591] | 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 | |
---|
[a4764f9] | 141 | TMP = os.path.join(MEDIA_ROOT, 'tmp') |
---|
| 142 | |
---|
[bf47591] | 143 | # Static files (CSS, JavaScript, Images) |
---|
| 144 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ |
---|
| 145 | |
---|
| 146 | SOURCES_URL = BASE_DIR + 'sources/' |
---|
| 147 | STATIC_ROOT = BASE_DIR + 'static/' |
---|
| 148 | STATIC_URL = '/static/' |
---|
| 149 | |
---|
| 150 | # Configuración de los directorios en donde se encuentran los archivos estáticos |
---|
| 151 | STATICFILES_DIRS = ( |
---|
| 152 | os.path.join(BASE_DIR, 'static/'), |
---|
| 153 | os.path.join(BASE_DIR, 'sources/'), |
---|
| 154 | ) |
---|
| 155 | |
---|
| 156 | # Configuración para el logeo de usuarios |
---|
| 157 | |
---|
[a4764f9] | 158 | LOGIN_URL = "/login" |
---|
[bf47591] | 159 | |
---|
| 160 | LOGOUT_URL= "/logout" |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | EMAIL_USE_TLS = True |
---|
| 164 | |
---|
| 165 | EMAIL_HOST = 'smtp.gmail.com' |
---|
| 166 | EMAIL_PORT = 587 |
---|
| 167 | EMAIL_HOST_USER = 'pruebautana@gmail.com' |
---|
| 168 | EMAIL_HOST_PASSWORD = 'autana2016' |
---|
[a4764f9] | 169 | EMAIL_FROM = EMAIL_HOST_USER |
---|