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

Add a Django Model MixIn #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django_cte/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals

from .cte import CTEManager, CTEQuerySet, With # noqa
from .cte import CTEModelMixIn, CTEManager, CTEQuerySet, With # noqa

__version__ = "1.3.1"
4 changes: 4 additions & 0 deletions django_cte/cte.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,7 @@ def from_queryset(cls, queryset_class, class_name=None):
"models with CTE support need to use a CTEQuerySet")
return super(CTEManager, cls).from_queryset(
queryset_class, class_name=class_name)

class CTEModelMixIn():
"""Model MixIn to inherit from, that has the Manager installed as 'objects'"""
objects = CTEManager()