Monday, November 24, 2014

Meta inheritance across abstract base class

Hallöchen!

I have the following model structure:

class A(models.Model):
...
class Meta:
ordering = ["timestamp"]
get_latest_by = "timestamp"

class B(A):
class Meta(A.Meta):
abstract = True

class C(B):
...

Then, class C doesn't haven ordering or get_latest_by set. Is this
expected behaviour? Then, I would simply re-define them in B.

Tschö,
Torsten.

--
Torsten Bronger Jabber ID: torsten.bronger@jabber.rwth-aachen.de
or http://bronger-jmp.appspot.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/87h9xospms.fsf%40physik.rwth-aachen.de.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment