I'm trying to model a "what's hot right now" like function for a video library (i.e a Most-viewed related to time - Clustering views (in time) will cause a higher rating), but I can't quite get my head around how do to it properly in Django without causing a multitude of database queries. I realize there's no one right answer to this, but I'm at a complete loss. The list will vary on categories but will be displayed in all views on the site, so I can't just hack together a solution - it needs to be fairly optimal.
I'm pretty new to Django so if there's any trick I could employ to make this less of a problem I'd love to know.
I should point out that I can add fields to the models at will, as we're still working on the specification for the site.