Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cover custom querysets #1

Open
pydanny opened this issue Nov 2, 2016 · 1 comment
Open

Cover custom querysets #1

pydanny opened this issue Nov 2, 2016 · 1 comment

Comments

@pydanny
Copy link
Member

pydanny commented Nov 2, 2016

class CustomQuerySet(models.QuerySet):
    def sample(self):
        return self.filter(sample=True)


class SampleModel(models.Model):
    objects = CustomQuerySet.as_manager()
@pydanny
Copy link
Member Author

pydanny commented Mar 9, 2020

🚚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant