I'm trying to obtain a list of articles and order them by their popularity over time. For example, older articles should rank lower even if they have a higher number of views.
In order to do this each article has a view count and a posted date. I'm guessing the simplest way would be to divide the article view count by the date posted... something like:
(view_count+comment_count) / date_posted = trend_score
I'm trying to understand if this is possible with the Django ORM, even if it is raw SQL? Would appreciate any help.