· 7 years ago · Sep 25, 2018, 12:40 AM
1import os
2
3# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
4BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
5PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__) + "../../../")
6
7STATIC_URL = '/static/'
8STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
9STATICFILES_DIRS = (
10 os.path.join(BASE_DIR, "aluguemportemporada/static"),
11 # '/var/www/static/',
12)
13
14SECRET_KEY = 'l+c2lw^pb9(t5h*3#m-2v)@(ny(^ip9b@a(^eipprr1$8d&&2+'
15
16DEBUG = True
17
18ALLOWED_HOSTS = []
19
20EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
21EMAIL_USE_TLS = True
22EMAIL_HOST = 'smtp.gmail.com'
23EMAIL_PORT = 587
24EMAIL_HOST_USER = 'marcos.vnaraujo@gmail.com'
25EMAIL_HOST_PASSWORD = '$#a2123'
26
27ADMINS = (
28 ('Marcos Alves', 'marcos.vnaraujo@gmail.com'),
29)
30MANAGERS = ADMINS
31
32
33
34INSTALLED_APPS = [
35 'django.contrib.admin',
36 'django.contrib.auth',
37 'django.contrib.contenttypes',
38 'django.contrib.sessions',
39 'django.contrib.messages',
40 'django.contrib.staticfiles',
41
42 'compressor',
43 'geoposition',
44 'core',
45 'sorl.thumbnail',
46 'multiupload',
47 'bootstrap3',
48
49]
50
51MIDDLEWARE = [
52 'django.middleware.security.SecurityMiddleware',
53 'django.contrib.sessions.middleware.SessionMiddleware',
54 'django.middleware.common.CommonMiddleware',
55 'django.middleware.csrf.CsrfViewMiddleware',
56 'django.contrib.auth.middleware.AuthenticationMiddleware',
57 'django.contrib.messages.middleware.MessageMiddleware',
58 'django.middleware.clickjacking.XFrameOptionsMiddleware',
59]
60
61
62ROOT_URLCONF = 'aluguemportemporada.urls'
63
64TEMPLATES = [
65 {
66 'BACKEND': 'django.template.backends.django.DjangoTemplates',
67 'DIRS': [],
68 'APP_DIRS': True,
69 'OPTIONS': {
70 'context_processors': [
71 'django.template.context_processors.debug',
72 'django.template.context_processors.request',
73 'django.contrib.auth.context_processors.auth',
74 'django.contrib.messages.context_processors.messages',
75 ],
76 },
77 },
78]
79
80WSGI_APPLICATION = 'aluguemportemporada.wsgi.application'
81
82DATABASES = {
83 'default': {
84 'ENGINE': 'django.db.backends.postgresql',
85 'NAME': 'aluguemportemporada',
86 'USER': 'aluguemportemporada',
87 'PASSWORD': 'aluguemportemporada',
88 'HOST': 'localhost',
89 'PORT': '5432',
90 }
91}
92
93AUTH_PASSWORD_VALIDATORS = [
94 {
95 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
96 },
97 {
98 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
99 },
100 {
101 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
102 },
103 {
104 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
105 },
106]
107
108LANGUAGE_CODE = 'pt-BR'
109
110TIME_ZONE = 'UTC'
111
112USE_I18N = True
113
114USE_L10N = True
115
116USE_TZ = True
117
118
119# Absolute filesystem path to the directory that will hold user-uploaded files.
120# Example: "/home/media/media.example.com/media/"
121MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')
122
123# URL that handles the media served from MEDIA_ROOT. Make sure to use a
124# trailing slash.
125# Examples: "http://media.example.com/media/", "http://example.com/media/"
126MEDIA_URL = '/media/'
127
128TEMPLATE_CONTEXT_PROCESSORS = [
129 'django.contrib.auth.context_processors.auth',
130 'django.core.context_processors.debug',
131 'django.core.context_processors.media',
132 'django.core.context_processors.request',
133 'django.core.context_processors.i18n',
134 'django.core.context_processors.static',
135 'django.core.context_processors.csrf',
136 'django.core.context_processors.tz',
137 'django.contrib.messages.context_processors.messages',
138]
139
140
141GEOPOSITION_GOOGLE_MAPS_API_KEY = 'AIzaSyAav0qF25wSfMUXiboGNExc-GJp8nx1bwE'
142GEOPOSITION_MAP_OPTIONS = {
143 'minZoom': 3,
144 'maxZoom': 15,
145}
146
147GEOPOSITION_MARKER_OPTIONS = {
148 'cursor': 'move'
149}
150
151AUTH_USER_MODEL = 'core.User'