Skip to content

Commit 9a0aeac

Browse files
renzonrenzon
authored andcommitted
Upgraded to Django 2.0.b1
close #9
1 parent ff64b46 commit 9a0aeac

File tree

7 files changed

+24
-32
lines changed

7 files changed

+24
-32
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# pythonpro
22
Source code of website www.python.pro.br
33

4-
54
It will be migrated from App Engine using Tekton to Django on Heroku
65

db.sqlite3

12 KB
Binary file not shown.

manage.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@
66
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pythonpro.settings")
77
try:
88
from django.core.management import execute_from_command_line
9-
except ImportError:
10-
# The above import may fail for some other reason. Ensure that the
11-
# issue is really that Django is missing to avoid masking other
12-
# exceptions on Python 2.
13-
try:
14-
import django
15-
except ImportError:
16-
raise ImportError(
17-
"Couldn't import Django. Are you sure it's installed and "
18-
"available on your PYTHONPATH environment variable? Did you "
19-
"forget to activate a virtual environment?"
20-
)
21-
raise
9+
except ImportError as exc:
10+
raise ImportError(
11+
"Couldn't import Django. Are you sure it's installed and "
12+
"available on your PYTHONPATH environment variable? Did you "
13+
"forget to activate a virtual environment?"
14+
) from exc
2215
execute_from_command_line(sys.argv)

pythonpro/settings.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
22
Django settings for pythonpro project.
33
4-
Generated by 'django-admin startproject' using Django 1.11.6.
4+
Generated by 'django-admin startproject' using Django 2.0b1.
55
66
For more information on this file, see
7-
https://docs.djangoproject.com/en/1.11/topics/settings/
7+
https://docs.djangoproject.com/en/dev/topics/settings/
88
99
For the full list of settings and their values, see
10-
https://docs.djangoproject.com/en/1.11/ref/settings/
10+
https://docs.djangoproject.com/en/dev/ref/settings/
1111
"""
1212

1313
import os
@@ -17,10 +17,10 @@
1717

1818

1919
# Quick-start development settings - unsuitable for production
20-
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
20+
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/
2121

2222
# SECURITY WARNING: keep the secret key used in production secret!
23-
SECRET_KEY = '-vpjdiw*uvkg0y!+_hxfeop)^dv1k(i+u()u#n)!6b5ns2bi0c'
23+
SECRET_KEY = '_vx-n(yf&188g_nn1k5z5o3=_mgq7byjeafh@rvttzw-okpmtm'
2424

2525
# SECURITY WARNING: don't run with debug turned on in production!
2626
DEBUG = True
@@ -71,7 +71,7 @@
7171

7272

7373
# Database
74-
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
74+
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
7575

7676
DATABASES = {
7777
'default': {
@@ -82,7 +82,7 @@
8282

8383

8484
# Password validation
85-
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
85+
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
8686

8787
AUTH_PASSWORD_VALIDATORS = [
8888
{
@@ -101,7 +101,7 @@
101101

102102

103103
# Internationalization
104-
# https://docs.djangoproject.com/en/1.11/topics/i18n/
104+
# https://docs.djangoproject.com/en/dev/topics/i18n/
105105

106106
LANGUAGE_CODE = 'en-us'
107107

@@ -115,6 +115,6 @@
115115

116116

117117
# Static files (CSS, JavaScript, Images)
118-
# https://docs.djangoproject.com/en/1.11/howto/static-files/
118+
# https://docs.djangoproject.com/en/dev/howto/static-files/
119119

120120
STATIC_URL = '/static/'

pythonpro/urls.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
"""pythonpro URL Configuration
22
33
The `urlpatterns` list routes URLs to views. For more information please see:
4-
https://docs.djangoproject.com/en/1.11/topics/http/urls/
4+
https://docs.djangoproject.com/en/dev/topics/http/urls/
55
Examples:
66
Function views
77
1. Add an import: from my_app import views
8-
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
8+
2. Add a URL to urlpatterns: path('', views.home, name='home')
99
Class-based views
1010
1. Add an import: from other_app.views import Home
11-
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
11+
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
1212
Including another URLconf
13-
1. Import the include() function: from django.conf.urls import url, include
14-
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
13+
1. Import the include() function: from django.urls import include, path
14+
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
1515
"""
16-
from django.conf.urls import url
1716
from django.contrib import admin
17+
from django.urls import path
1818

1919
urlpatterns = [
20-
url(r'^admin/', admin.site.urls),
20+
path('admin/', admin.site.urls),
2121
]

pythonpro/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
It exposes the WSGI callable as a module-level variable named ``application``.
55
66
For more information on this file, see
7-
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
7+
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
88
"""
99

1010
import os

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Django==1.11.6
1+
Django==2.0b1
22
pytz==2017.2

0 commit comments

Comments
 (0)