Created
November 19, 2016 14:26
-
-
Save hannal/568f7277fdf1452890ab1a467f5465bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseModel(models.Model): | |
class Meta: | |
abstract = True | |
class A(BaseModel): | |
pass | |
class B(BaseModel): | |
pass | |
for model in BaseModel.__subclasses__(): | |
do_something() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment