11import json
2+ from urllib .request import urlopen
3+ from urllib .error import HTTPError
24from django .conf import settings
35from django .core .cache import cache
46from django .db import models
5- from django .utils .six import python_2_unicode_compatible
67from django .utils .functional import cached_property
78from django .utils .translation import ugettext_lazy as _
89from fluent_contents .extensions import PluginImageField , PluginHtmlField , PluginUrlField
910from 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
2013class 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
3729class 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
5041class 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
8575class PackageItem (ContentItem ):
8676 """
8777 An item on the page that describes a Python package.
0 commit comments