Skip to content
Snippets Groups Projects
Commit d1579a38 authored by Eduardo Klosowski's avatar Eduardo Klosowski
Browse files

Versão inicial para Django 1.11 (1.11rc1)

parent 23497c68
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,8 +3,8 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
 
Loading
Loading
Loading
Loading
@@ -4,7 +4,19 @@ import sys
 
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
from django.core.management import execute_from_command_line
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try:
import django # NOQA
except ImportError:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
execute_from_command_line(sys.argv)
"""
Django settings for {{ project_name }} project.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
import dj_database_url
 
Loading
Loading
@@ -20,7 +10,7 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
 
 
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
 
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = get_env_bool('DEBUG')
Loading
Loading
@@ -47,12 +37,6 @@ INSTALLED_APPS = [
'whitenoise.runserver_nostatic',
'django.contrib.staticfiles',
]
if DEBUG:
try:
import debug_toolbar # NOQA
INSTALLED_APPS.append('debug_toolbar')
except ImportError:
pass
 
MIDDLEWARE_CLASSES = [
'django.middleware.security.SecurityMiddleware',
Loading
Loading
@@ -61,11 +45,19 @@ MIDDLEWARE_CLASSES = [
'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',
]
 
if DEBUG:
try:
import debug_toolbar # NOQA
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware')
INTERNAL_IPS = ['127.0.0.1', '::1']
except ImportError:
pass
ROOT_URLCONF = '{{ project_name }}.urls'
 
TEMPLATES = [
Loading
Loading
from django.conf.urls import url
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
 
 
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
if settings.DEBUG:
try:
import debug_toolbar # NOQA
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),
]
except ImportError:
pass
"""
WSGI config for {{ project_name }} project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
 
from django.core.wsgi import get_wsgi_application
Loading
Loading
Django==1.9.10
dj-database-url==0.4.1
gunicorn==19.6.0
whitenoise==3.2
#mysqlclient==1.3.7
#psycopg2==2.6.2
dj-database-url==0.4.2
django==1.11rc1
gunicorn==19.7.1
whitenoise==3.3.0
#mysqlclient==1.3.10
#psycopg2==2.7.1
Loading
Loading
@@ -5,8 +5,9 @@ omit =
env/*
venv/*
manage.py
{{ project_name }}/utils.py
{{ project_name }}/settings.py
{{ project_name }}/urls.py
{{ project_name }}/utils.py
{{ project_name }}/wsgi.py
 
[flake8]
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment