File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 22from django import forms
33from django .conf import settings
44from django .utils .functional import cached_property
5- from wagtail .core .blocks import (BooleanBlock , CharBlock , ChoiceBlock ,
6- StructBlock , TextBlock )
7- from wagtail .core .blocks .struct_block import StructBlockAdapter
5+
86from wagtail .core .telepath import register
7+ from wagtail import VERSION
98
9+ # Backwards compatibility
10+ if VERSION [0 ] < 3 :
11+ from wagtail .core .blocks .struct_block import StructBlockAdapter
12+ from wagtail .core .blocks import (BooleanBlock , CharBlock , ChoiceBlock ,
13+ StructBlock , TextBlock )
14+ else :
15+ from wagtail .blocks .struct_block import StructBlockAdapter
16+ from wagtail .blocks import (BooleanBlock , CharBlock , ChoiceBlock ,
17+ StructBlock , TextBlock )
1018
1119def get_choices ():
1220 default_choices = (
@@ -36,8 +44,6 @@ class Meta:
3644 label = 'Table Block'
3745 template = 'wagtailtables/table_block.html'
3846
39-
40-
4147
4248class TableAdapter (StructBlockAdapter ):
4349 js_constructor = 'streams.blocks.TableBlock'
You can’t perform that action at this time.
0 commit comments