mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-05-01 07:34:42 +00:00
Added missing imports to examples in README.rst
This commit is contained in:
parent
c83c14c46f
commit
7b03f1d001
1 changed files with 2 additions and 0 deletions
|
|
@ -351,6 +351,7 @@ directly on the manager::
|
|||
from datetime import datetime
|
||||
from django.db import models
|
||||
from django.db.models.query import QuerySet
|
||||
from model_utils.managers import PassThroughManager
|
||||
|
||||
class PostQuerySet(QuerySet):
|
||||
def by_author(self, user):
|
||||
|
|
@ -398,6 +399,7 @@ manager with ``PassThroughManager``::
|
|||
from datetime import datetime
|
||||
from django.db import models
|
||||
from django.db.models.query import QuerySet
|
||||
from model_utils.managers import UpdateOrCreateMixin
|
||||
|
||||
class PostQuerySet(QuerySet, UpdateOrCreateMixin):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue