Created
June 27, 2016 23:02
-
-
Save kyle-eshares/b99455dc27abe5a350a6f94f372eeb30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class AppQueryset(models.QuerySet): | |
pass | |
class AppManager(models.Manager): | |
queryset_class = AppQuerySet | |
def get_queryset(self): | |
return self.queryset_class(self.model) | |
class AppModel(models.Model): | |
objects = AppManager() | |
class Meta: | |
abstract = True | |
... | |
from django.views import generic | |
class View(generic.View): | |
pass | |
class TemplateView(generic.TemplateView, View): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment