Skip to content

Commit 8a02c10

Browse files
authored
Upgrade to Django 2.2. (#1830)
* Upgrade to Django 2.2. Update dependencies for django 2.2 compatibility * Fix Github Action PostgreSQL config
1 parent 8716928 commit 8a02c10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+483
-266
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ jobs:
66
services:
77
postgres:
88
image: postgres:10.1
9+
env:
10+
POSTGRES_USER: postgres
11+
POSTGRES_PASSWORD: postgres
12+
POSTGRES_DB: pythonorg
913
ports:
10-
- 5432:5432
14+
- 5432:5432
15+
# needed because the postgres container does not provide a healthcheck
16+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1117
steps:
1218
- name: Check out repository
1319
uses: actions/checkout@v2
@@ -33,7 +39,7 @@ jobs:
3339
run: |
3440
python -Wd -m coverage run manage.py test -v2
3541
env:
36-
DATABASE_URL: postgres://postgres:@127.0.0.1:5432/python.org
42+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg
3743
- name: Coverage
3844
run: |
3945
coverage report -m --fail-under=75

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ static/stylesheets/no-mq.css
1717
static/stylesheets/style.css
1818
__pycache__
1919
*.db
20+
*.py[co]
2021
.vscode
2122
.~lock.*
23+
.idea
24+
.coverage
25+
.env

banners/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = 'banners.apps.BannersAppConfig'

banners/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class BannersAppConfig(AppConfig):
5+
6+
name = 'banners'

base-requirements.txt

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,49 @@
11
dj-database-url==0.5.0
2-
django-pipeline==1.6.14
3-
django-sitetree==1.10.0
4-
Django==2.0.13
2+
django-pipeline==2.0.6
3+
django-sitetree==1.17.0
4+
Django==2.2.24
55
docutils==0.12
66
Markdown==3.3.4
7-
cmarkgfm==0.4.2
7+
cmarkgfm==0.6.0
88
Pillow==8.3.1
99
psycopg2==2.8.6
10-
python3-openid==3.1.0
10+
python3-openid==3.2.0
11+
python-decouple==3.4
1112
# lxml used by BeautifulSoup.
1213
lxml==4.6.3
13-
cssselect==0.9.1
14+
cssselect==1.1.0
1415
feedparser==6.0.8
15-
beautifulsoup4==4.6.0
16-
icalendar==3.8.4
16+
beautifulsoup4==4.9.3
17+
icalendar==4.0.7
1718
chardet==4.0.0
1819
# TODO: We may drop 'django-imagekit' completely.
1920
django-imagekit==4.0.2
20-
git+https://github.com/django-haystack/django-haystack.git@802b0f6f4b3b99314453261876a32bac2bbec94f
21+
django-haystack==3.0
2122
elasticsearch>=5,<6
2223
# TODO: 0.14.0 only supports Django 1.8 and 1.11.
23-
django-tastypie==0.14.1
24+
django-tastypie==0.14.3
2425

25-
pytz==2017.2
26-
python-dateutil==2.8.1
26+
pytz==2021.1
27+
python-dateutil==2.8.2
2728

2829
requests[security]>=2.26.0
2930

30-
django-honeypot==0.6.0
31-
django-markupfield==1.4.3
31+
django-honeypot==1.0.1
32+
django-markupfield==2.0.0
3233
django-markupfield-helpers==0.1.1
3334

3435
django-allauth==0.41.0
3536

36-
django-waffle==0.14
37+
django-waffle==2.2.1
3738

38-
djangorestframework==3.8.2
39-
django-filter==1.1.0
39+
djangorestframework==3.12.2
40+
django-filter==2.4.0
4041
django-ordered-model==3.4.3
4142
django-widget-tweaks==1.4.8
42-
django-countries==6.1.3
43+
django-countries==7.2.1
4344
xhtml2pdf==0.2.5
44-
django-easy-pdf==0.1.1
45+
django-easy-pdf3==0.1.2
4546
num2words==0.5.10
46-
django-polymorphic==2.1.2
47+
django-polymorphic==3.0.0
4748
sorl-thumbnail==12.7.0
4849
docxtpl==0.12.0

blogs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = 'blogs.apps.BlogsAppConfig'

blogs/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class BlogsAppConfig(AppConfig):
5+
6+
name = 'blogs'

blogs/urls.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from django.conf.urls import url
2-
31
from . import views
2+
from django.urls import path
43

54
urlpatterns = [
6-
url(r'^$', views.BlogHome.as_view(), name='blog'),
5+
path('', views.BlogHome.as_view(), name='blog'),
76
]

boxes/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = 'boxes.apps.BoxesAppConfig'

boxes/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class BoxesAppConfig(AppConfig):
5+
6+
name = 'boxes'

0 commit comments

Comments
 (0)