mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Remove FeaturedManager and related obsolete test model code
The code under test was removed in 6ae66e01, but some of the test code
remained.
This commit is contained in:
parent
6e722b51b0
commit
6c39b58cb4
1 changed files with 0 additions and 26 deletions
|
|
@ -201,32 +201,6 @@ class NoRendered(models.Model):
|
|||
body = SplitField(no_excerpt_field=True)
|
||||
|
||||
|
||||
class AuthorMixin:
|
||||
def by_author(self, name):
|
||||
return self.filter(author=name)
|
||||
|
||||
|
||||
class PublishedMixin:
|
||||
def published(self):
|
||||
return self.filter(published=True)
|
||||
|
||||
|
||||
def unpublished(self):
|
||||
return self.filter(published=False)
|
||||
|
||||
|
||||
class ByAuthorQuerySet(models.query.QuerySet, AuthorMixin):
|
||||
pass
|
||||
|
||||
|
||||
class FeaturedManager(models.Manager):
|
||||
def get_queryset(self):
|
||||
kwargs = {}
|
||||
if hasattr(self, "_db"):
|
||||
kwargs["using"] = self._db
|
||||
return ByAuthorQuerySet(self.model, **kwargs).filter(feature=True)
|
||||
|
||||
|
||||
class AbstractTracked(models.Model):
|
||||
number = 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue