0

I have following abstract model in Django project, which I don`t want to have as db tables:

class Base(object):
    class Meta:
        abstract = True

and one subclass:

class Sub(Base):

I trying to get Sub from Base by answeer from this question: How to find all the subclasses of a class given its name?

Base.__subclasses__()

But, I get only empty list. Why?

1 Answers1

0

I found another question, where answer said, that you need to import each subclasses of Base, then they will be available for Python.

__subclasses__ not showing anything