Skip to content

oysnet/django-querysetunion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

from django.core.paginator import Paginator
from editorials.models import Article
from community.models import BlogPost 
from querysetunion.query import QuerySetUnion

results = QuerySetUnion().models(Article,BlogPost).filter(status="draft").order_by('status','-publication_date')
paginator = Paginator(results, 10)
print paginator.page(1)

            

About

Django queryset for multiple models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published