I've been searching quite a while to figure out why some of my models worked while others didn't.
By working I mean that you can see the dragging widget.
Finally I figured out that this problem comes from overriding the META class:
This code does not work:
from wagtailorderable.models import Orderable
class MyModel(Orderable):
# Some fields, panels etc here
class META:
verbose_name_plural = "My Models"
This code does work:
from wagtailorderable.models import Orderable
class MyModel(Orderable):
# Some fields, panels etc here
# No META field
Extending META (instead of overriding) does work though, so this is probably the best option if you want to set verbose names etc.:
This code does work as well:
from wagtailorderable.models import Orderable
class MyModel(Orderable):
# Some fields, panels etc here
class META(Orderable.META): # note the inheritance here
verbose_name_plural = "My Models"
In general I'm not sure, if this is a bug, I'd rather say this is unexpected behavior.
I've been searching quite a while to figure out why some of my models worked while others didn't.
By working I mean that you can see the dragging widget.
Finally I figured out that this problem comes from overriding the
METAclass:This code does not work:
This code does work:
Extending
META(instead of overriding) does work though, so this is probably the best option if you want to set verbose names etc.:This code does work as well:
In general I'm not sure, if this is a bug, I'd rather say this is unexpected behavior.