wish of those help The docs for django-hitcount describe here how to add a field to one of your models (Post) that will relate back to the HitCount model. After you add a hit_count attribute to your Post model that relates by following the example in the docs, you can order and/or filter by hits as well as post dates in your query. You query would look something like this:
How to combine two or more querysets in a Django view?
By : iqbal
Date : March 29 2020, 07:55 AM
will be helpful for those in need Concatenating the querysets into a list is the simplest approach. If the database will be hit for all querysets anyway (e.g. because the result needs to be sorted), this won't add further cost.
from itertools import chain
result_list = list(chain(page_list, article_list, post_list))