mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +08:00
Use runtime information to determine whether class is a models.Model subclass (#182)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user