In class Test2 I want to include both the models and fields in its class Meta. Is this possible and how? This is what I have tried...
I have a mixin:
class Test1(object):
        pass
    class Meta:
        fields = ("url",)
class Test2(Test1):
        pass
    class Meta:
        super(Meta) <=== does not work
        models= test
                Your answer can be found in the Django Documentation
I.E.
from django.db import models
class CommonInfo(models.Model):
    # ...
    class Meta:
        abstract = True
        ordering = ['name']
class Student(CommonInfo):
    # ...
    class Meta(CommonInfo.Meta):
        db_table = 'student_info'
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With