1 | """ |
---|
2 | Django settings for sicpsur project. |
---|
3 | |
---|
4 | Generated by 'django-admin startproject' using Django 1.9.2. |
---|
5 | |
---|
6 | For more information on this file, see |
---|
7 | https://docs.djangoproject.com/en/1.9/topics/settings/ |
---|
8 | |
---|
9 | For the full list of settings and their values, see |
---|
10 | https://docs.djangoproject.com/en/1.9/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.9/howto/deployment/checklist/ |
---|
21 | |
---|
22 | # SECURITY WARNING: keep the secret key used in production secret! |
---|
23 | SECRET_KEY = 'qixoasqcykt(*#@e4%mi9yek6_cypk*#xa@bgsldp+ole5#u16' |
---|
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 | INSTALLED_APPS = [ |
---|
34 | 'django.contrib.admin', |
---|
35 | 'django.contrib.auth', |
---|
36 | 'django.contrib.contenttypes', |
---|
37 | 'django.contrib.sessions', |
---|
38 | 'django.contrib.messages', |
---|
39 | 'django.contrib.staticfiles', |
---|
40 | 'autenticar', |
---|
41 | #'gdstorage', |
---|
42 | 'cargadatos', |
---|
43 | 'matriz', |
---|
44 | 'mensajes', |
---|
45 | |
---|
46 | ] |
---|
47 | |
---|
48 | #GOOGLE_DRIVE_STORAGE_JSON_KEY_FILE = BASE_DIR + '/almacen-43a46d675f2f.json' |
---|
49 | #GOOGLE_DRIVE_STORAGE_SERVICE_EMAIL = 'eparedes@almacen-1369.iam.gserviceaccount.com' |
---|
50 | |
---|
51 | |
---|
52 | MIDDLEWARE_CLASSES = [ |
---|
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.auth.middleware.SessionAuthenticationMiddleware', |
---|
59 | 'django.contrib.messages.middleware.MessageMiddleware', |
---|
60 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
---|
61 | ] |
---|
62 | |
---|
63 | ROOT_URLCONF = 'sicpsur.urls' |
---|
64 | |
---|
65 | TEMPLATES = [ |
---|
66 | { |
---|
67 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
---|
68 | 'DIRS': ['/home/eparedes/sicpsur/templates','/home/eparedes/sicpsur/templates/autenticar'], |
---|
69 | 'APP_DIRS': True, |
---|
70 | 'OPTIONS': { |
---|
71 | 'context_processors': [ |
---|
72 | 'django.template.context_processors.debug', |
---|
73 | 'django.template.context_processors.request', |
---|
74 | 'django.contrib.auth.context_processors.auth', |
---|
75 | 'django.contrib.messages.context_processors.messages', |
---|
76 | ], |
---|
77 | }, |
---|
78 | }, |
---|
79 | ] |
---|
80 | |
---|
81 | WSGI_APPLICATION = 'sicpsur.wsgi.application' |
---|
82 | |
---|
83 | |
---|
84 | # Database |
---|
85 | # https://docs.djangoproject.com/en/1.9/ref/settings/#databases |
---|
86 | |
---|
87 | DATABASES = { |
---|
88 | 'default': { |
---|
89 | 'ENGINE': 'django.db.backends.postgresql', |
---|
90 | 'NAME': 'sicpsur', |
---|
91 | 'USER': 'adminsicpsur', |
---|
92 | 'PASSWORD': '1qa2ws3ed', |
---|
93 | 'HOST': '127.0.0.1', |
---|
94 | 'PORT': '5432', |
---|
95 | |
---|
96 | |
---|
97 | # 'ENGINE': 'django.db.backends.sqlite3', |
---|
98 | # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
---|
99 | } |
---|
100 | } |
---|
101 | |
---|
102 | |
---|
103 | # Password validation |
---|
104 | # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators |
---|
105 | |
---|
106 | AUTH_PASSWORD_VALIDATORS = [ |
---|
107 | { |
---|
108 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', |
---|
109 | }, |
---|
110 | { |
---|
111 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', |
---|
112 | }, |
---|
113 | { |
---|
114 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', |
---|
115 | }, |
---|
116 | { |
---|
117 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', |
---|
118 | }, |
---|
119 | ] |
---|
120 | |
---|
121 | |
---|
122 | # Internationalization |
---|
123 | # https://docs.djangoproject.com/en/1.9/topics/i18n/ |
---|
124 | |
---|
125 | #LANGUAGE_CODE = 'en-us' |
---|
126 | LANGUAGE_CODE = 'es-ve' |
---|
127 | |
---|
128 | TIME_ZONE = 'UTC' |
---|
129 | |
---|
130 | USE_I18N = True |
---|
131 | |
---|
132 | USE_L10N = True |
---|
133 | |
---|
134 | USE_TZ = True |
---|
135 | |
---|
136 | |
---|
137 | # Static files (CSS, JavaScript, Images) |
---|
138 | # https://docs.djangoproject.com/en/1.9/howto/static-files/ |
---|
139 | |
---|
140 | STATIC_URL = '/static/' |
---|
141 | |
---|
142 | STATIC_ROOT = '/static/' |
---|
143 | |
---|
144 | STATICFILES_DIRS = ( |
---|
145 | os.path.join(BASE_DIR, "static"), |
---|
146 | '/var/www/static/', |
---|
147 | ) |
---|
148 | |
---|