mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Merge pull request #598 from ProtixIT/remove-obsolete-test-models
Remove obsolete test models
This commit is contained in:
commit
87a9466afa
1 changed files with 0 additions and 35 deletions
|
|
@ -192,41 +192,6 @@ class SplitFieldAbstractParent(models.Model):
|
|||
abstract = True
|
||||
|
||||
|
||||
class NoRendered(models.Model):
|
||||
"""
|
||||
Test that the no_excerpt_field keyword arg works. This arg should
|
||||
never be used except by the South model-freezing.
|
||||
|
||||
"""
|
||||
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