Created
May 6, 2015 01:27
-
-
Save HigorMonteiro/8b72bf0947a76ac9c253 to your computer and use it in GitHub Desktop.
arquivo settings.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Django settings for blog project. | |
For more information on this file, see | |
https://docs.djangoproject.com/en/1.7/topics/settings/ | |
For the full list of settings and their values, see | |
https://docs.djangoproject.com/en/1.7/ref/settings/ | |
""" | |
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) | |
import os | |
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | |
from decouple import config | |
from dj_databese_url import parse as parse_db_url | |
# import psycopg2.extensions | |
# Quick-start development settings - unsuitable for production | |
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ | |
# SECURITY WARNING: keep the secret key used in production secret! | |
SECRET_KEY = 'suvld9^fom4e#9g0-+p^ji^3xdh98cv9l4cr41t74@@j)^l@cg' | |
# SECURITY WARNING: don't run with debug turned on in production! | |
DEBUG = True | |
TEMPLATE_DEBUG = True | |
ALLOWED_HOSTS = [] | |
# Application definition | |
INSTALLED_APPS = ( | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'noticias' | |
) | |
MIDDLEWARE_CLASSES = ( | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
'django.middleware.common.CommonMiddleware', | |
'django.middleware.csrf.CsrfViewMiddleware', | |
'django.contrib.auth.middleware.AuthenticationMiddleware', | |
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', | |
'django.contrib.messages.middleware.MessageMiddleware', | |
'django.middleware.clickjacking.XFrameOptionsMiddleware', | |
) | |
ROOT_URLCONF = 'blog.urls' | |
WSGI_APPLICATION = 'blog.wsgi.application' | |
# Database | |
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases | |
# DATABASES = { | |
# 'default': { | |
# 'ENGINE': 'django.db.backends.sqlite3', | |
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), | |
# } | |
# } | |
DATABASES = { | |
'default': parse_db_url(config('DATABASE_URL'))} | |
DEBUG = config('DEBUG', cast=bool) | |
ALLOWED_HOSTS = ['domproduc.herokuapp.com'] | |
STATIC_ROOT = os.path.join('BASE_DIR', 'static_root') | |
# DATABASES = { | |
# # ... | |
# 'OPTIONS': { | |
# 'isolation_level': psycopg2.extensions.ISOLATION_LEVEL_SERIALIZABLE, | |
# }, | |
# } | |
# Internationalization | |
# https://docs.djangoproject.com/en/1.7/topics/i18n/ | |
LANGUAGE_CODE = 'pt-br' | |
# TIME_ZONE = 'UTC' | |
TIME_ZONE = 'America/Fortaleza' | |
USE_I18N = True | |
USE_L10N = True | |
USE_TZ = True | |
# Static files (CSS, JavaScript, Images) | |
# https://docs.djangoproject.com/en/1.7/howto/static-files/ | |
STATIC_URL = '/assets/' | |
STATICFILES_DIRS = ('assets',) | |
TEMPLATE_DIRS = ( | |
os.path.join(BASE_DIR, 'templates'), | |
) | |
# STATIC_URL = '/static/' | |
# TEMPLATE_DIRS = ( | |
# os.path.join(BASE_DIR, 'templates'), | |
# ) | |
# STATICFILES_DIRS = ( | |
# os.path.join(BASE_DIR, 'estaticos'), | |
# os.path.join(BASE_DIR, 'bootstrap'), | |
# os.path.join(BASE_DIR, 'assets'), | |
# ) | |
# STATIC_ROOT = os.path.join(BASE_DIR, 'static_root') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment