1 | """ |
---|
2 | Django settings for sepai project. |
---|
3 | |
---|
4 | Generated by 'django-admin startproject' using Django 1.8.3. |
---|
5 | |
---|
6 | For more information on this file, see |
---|
7 | https://docs.djangoproject.com/en/1.8/topics/settings/ |
---|
8 | |
---|
9 | For the full list of settings and their values, see |
---|
10 | https://docs.djangoproject.com/en/1.8/ref/settings/ |
---|
11 | """ |
---|
12 | |
---|
13 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
---|
14 | import os |
---|
15 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
---|
16 | |
---|
17 | TEMPLATES_SEPAI = BASE_DIR + '/templates' |
---|
18 | |
---|
19 | # Quick-start development settings - unsuitable for production |
---|
20 | # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ |
---|
21 | |
---|
22 | # SECURITY WARNING: keep the secret key used in production secret! |
---|
23 | SECRET_KEY = 'xllp09h@mgwpe(hbh20)@j1koxu%2tw^*!x_za3y1kjkx2!98j' |
---|
24 | |
---|
25 | # SECURITY WARNING: don't run with debug turned on in production! |
---|
26 | DEBUG = True |
---|
27 | |
---|
28 | SEPAI_SSL_VERIFY = False |
---|
29 | |
---|
30 | ALLOWED_HOSTS = [] |
---|
31 | |
---|
32 | |
---|
33 | # Application definition |
---|
34 | |
---|
35 | INSTALLED_APPS = ( |
---|
36 | 'dal', |
---|
37 | 'dal_select2', |
---|
38 | 'django.contrib.admin', |
---|
39 | 'django.contrib.auth', |
---|
40 | 'django.contrib.contenttypes', |
---|
41 | 'django.contrib.sessions', |
---|
42 | 'django.contrib.messages', |
---|
43 | 'django.contrib.staticfiles', |
---|
44 | 'django_bootstrap_breadcrumbs', |
---|
45 | 'django_extensions', |
---|
46 | 'adaptor', |
---|
47 | 'multi_form_view', |
---|
48 | 'captcha', |
---|
49 | 'utils', |
---|
50 | 'users', |
---|
51 | 'proyectos', |
---|
52 | ) |
---|
53 | |
---|
54 | MIDDLEWARE_CLASSES = ( |
---|
55 | 'django.contrib.sessions.middleware.SessionMiddleware', |
---|
56 | 'django.middleware.common.CommonMiddleware', |
---|
57 | 'django.middleware.csrf.CsrfViewMiddleware', |
---|
58 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
---|
59 | 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
---|
60 | 'django.contrib.messages.middleware.MessageMiddleware', |
---|
61 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
---|
62 | 'django.middleware.security.SecurityMiddleware', |
---|
63 | ) |
---|
64 | |
---|
65 | ROOT_URLCONF = 'sepai.urls' |
---|
66 | |
---|
67 | TEMPLATES = [ |
---|
68 | { |
---|
69 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
---|
70 | 'DIRS': [TEMPLATES_SEPAI, ], |
---|
71 | 'APP_DIRS': True, |
---|
72 | 'OPTIONS': { |
---|
73 | 'context_processors': [ |
---|
74 | 'django.template.context_processors.debug', |
---|
75 | 'django.template.context_processors.request', |
---|
76 | 'django.contrib.auth.context_processors.auth', |
---|
77 | 'django.contrib.messages.context_processors.messages', |
---|
78 | ], |
---|
79 | }, |
---|
80 | }, |
---|
81 | ] |
---|
82 | |
---|
83 | WSGI_APPLICATION = 'sepai.wsgi.application' |
---|
84 | |
---|
85 | |
---|
86 | # Database |
---|
87 | # https://docs.djangoproject.com/en/1.8/ref/settings/#databases |
---|
88 | |
---|
89 | DATABASES = { |
---|
90 | 'default': { |
---|
91 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', |
---|
92 | 'NAME': 'sepai', |
---|
93 | 'USER': 'postgres', |
---|
94 | 'PASSWORD': 'postgres', |
---|
95 | 'HOST': 'localhost', |
---|
96 | 'PORT': '5432', |
---|
97 | 'ATOMIC_REQUESTS': True, # Crea transacciones en cada peticion de la vista |
---|
98 | } |
---|
99 | } |
---|
100 | |
---|
101 | |
---|
102 | # Internationalization |
---|
103 | # https://docs.djangoproject.com/en/1.8/topics/i18n/ |
---|
104 | |
---|
105 | LANGUAGE_CODE = 'es-ve' |
---|
106 | |
---|
107 | TIME_ZONE = 'UTC' |
---|
108 | |
---|
109 | USE_I18N = True |
---|
110 | |
---|
111 | USE_L10N = True |
---|
112 | |
---|
113 | USE_TZ = True |
---|
114 | |
---|
115 | BASE_URL = "" |
---|
116 | |
---|
117 | |
---|
118 | MEDIA_ROOT = os.path.join(BASE_DIR, 'sources/') |
---|
119 | MEDIA_URL = '/sources/' |
---|
120 | |
---|
121 | # Static files (CSS, JavaScript, Images) |
---|
122 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ |
---|
123 | |
---|
124 | SOURCES_URL = BASE_DIR + 'sources/' |
---|
125 | STATIC_ROOT = BASE_DIR + 'static/' |
---|
126 | STATIC_URL = '/static/' |
---|
127 | |
---|
128 | STATICFILES_DIRS = ( |
---|
129 | os.path.join(BASE_DIR, 'static/'), |
---|
130 | os.path.join(BASE_DIR, 'sources/'), |
---|
131 | ) |
---|
132 | |
---|
133 | # FIXTURE_DIRS = (os.path.join(BASE_DIR, 'fixtures'),) |
---|
134 | |
---|
135 | LOGIN_URL = "/" |
---|
136 | |
---|
137 | LOGOUT_URL = "/logout" |
---|
138 | |
---|
139 | EMAIL_USE_TLS = True |
---|
140 | |
---|
141 | EMAIL_HOST = 'smtp.gmail.com' |
---|
142 | EMAIL_PORT = 587 |
---|
143 | EMAIL_HOST_USER = 'pruebautana@gmail.com' |
---|
144 | EMAIL_HOST_PASSWORD = 'autana2016' |
---|
145 | EMAIL_FROM = EMAIL_HOST_USER |
---|