Use runtime information to determine whether class is a models.Model subclass (#182)

This commit is contained in:
Maxim Kurnikov
2019-09-28 04:05:54 +03:00
committed by GitHub
parent 5910bd1b25
commit 2c23d8e70f
6 changed files with 26 additions and 25 deletions

View File

@@ -144,7 +144,10 @@
- path: myapp/models.py
content: |
from django.db import models
class AuthMixin:
class AuthMixin(models.Model):
class Meta:
abstract = True
username = models.CharField(max_length=100)
class MyModel(AuthMixin, models.Model):
pass