kopia lustrzana https://github.com/wagtail/wagtail
Fixed #3078 -- Add empty panel attributes
Accessing any of these attributes before importing `wagtailadmin.edit_handlers` would raise a `AttributeError`. In some cases this would mask the actual error; e.g. forgetting to import `wagtailadmin.edit_handlers`.pull/3101/merge
rodzic
992b315be6
commit
fb06f6c0c1
|
@ -174,6 +174,7 @@ Contributors
|
||||||
* Axel Haustant
|
* Axel Haustant
|
||||||
* Henk-Jan van Hasselaar
|
* Henk-Jan van Hasselaar
|
||||||
* alexfromvl
|
* alexfromvl
|
||||||
|
* Jaap Roes
|
||||||
|
|
||||||
Translators
|
Translators
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -396,6 +396,12 @@ class Page(six.with_metaclass(PageBase, AbstractPage, index.Indexed, Clusterable
|
||||||
# Do not allow plain Page instances to be created through the Wagtail admin
|
# Do not allow plain Page instances to be created through the Wagtail admin
|
||||||
is_creatable = False
|
is_creatable = False
|
||||||
|
|
||||||
|
# Define these attributes early to avoid masking errors. (Issue #3078)
|
||||||
|
# The canonical definition is in wagtailadmin.edit_handlers.
|
||||||
|
content_panels = []
|
||||||
|
promote_panels = []
|
||||||
|
settings_panels = []
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(Page, self).__init__(*args, **kwargs)
|
super(Page, self).__init__(*args, **kwargs)
|
||||||
if not self.id and not self.content_type_id:
|
if not self.id and not self.content_type_id:
|
||||||
|
|
Ładowanie…
Reference in New Issue