Skip to content

Commit 2c2ce15

Browse files
committed
Bump to Django 3 instead
1 parent f03f753 commit 2c2ce15

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

src/djangofluent/apps/themeelements/models.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
import json
2+
from urllib.request import urlopen
3+
from urllib.error import HTTPError
24
from django.conf import settings
35
from django.core.cache import cache
46
from django.db import models
5-
from django.utils.six import python_2_unicode_compatible
67
from django.utils.functional import cached_property
78
from django.utils.translation import ugettext_lazy as _
89
from fluent_contents.extensions import PluginImageField, PluginHtmlField, PluginUrlField
910
from fluent_contents.models import ContentItem
1011

11-
try:
12-
# Python 3
13-
from urllib.request import urlopen
14-
from urllib.error import HTTPError
15-
except ImportError:
16-
from urllib2 import urlopen, HTTPError # Python 2
1712

18-
19-
@python_2_unicode_compatible
2013
class Col12Item(ContentItem):
2114
"""
2215
A column that takes 1/2 of the width
@@ -33,7 +26,6 @@ def __str__(self):
3326
return self.title
3427

3528

36-
@python_2_unicode_compatible
3729
class ContentBoxItem(ContentItem):
3830
"""
3931
The context box includes a divider.
@@ -46,7 +38,6 @@ def __str__(self):
4638
return u'splitter'
4739

4840

49-
@python_2_unicode_compatible
5041
class ImageTextItem(ContentItem):
5142
"""
5243
A block with image + text
@@ -81,7 +72,6 @@ def image_css_class(self):
8172
return 'image_fl'
8273

8374

84-
@python_2_unicode_compatible
8575
class PackageItem(ContentItem):
8676
"""
8777
An item on the page that describes a Python package.

src/requirements/base.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Install with: `pip install -r requirements/base.txt`
22

33
# Infrastructure
4-
Django == 2.2.24
4+
Django == 3.2.5
55
Pillow == 8.3.1
66
psycopg2 == 2.9.1
77
python-memcached == 1.59

src/requirements/base.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#
55
# pip-compile --output-file=requirements/base.txt requirements/base.in
66
#
7+
asgiref==3.4.1
8+
# via django
79
attrs==21.2.0
810
# via pytest
911
beautifulsoup4==4.9.3
@@ -22,7 +24,7 @@ coverage==5.5
2224
# via
2325
# -r requirements/base.in
2426
# pytest-cov
25-
django==2.2.24
27+
django==3.2.5
2628
# via
2729
# -r requirements/base.in
2830
# django-appconf

0 commit comments

Comments
 (0)