django-hitcount
django-hitcount copied to clipboard
Save by date feature
In my case I need get popular post by last {month|week|day}'s hitcount. Therefore I need to save hitcount separated by date or date range.
What is saved now:
id | hits | modified | content_type_id | object_pk |
---|---|---|---|---|
1 | 12 | 2021-06-22 04:05:36.622791 | 85 | 1 |
2 | 5 | 2021-06-22 03:58:53.801797 | 85 | 2 |
What I wanted to save:
id | hits | start_date | end_date | modified | content_type_id | object_pk |
---|---|---|---|---|---|---|
1 | 12 | 2021-06-20 04:05:36 | 2021-06-21 04:05:36 | 2021-06-22 04:05:36 | 85 | 1 |
2 | 5 | 2021-06-21 04:05:36 | 2021-06-22 04:05:36 | 2021-06-22 03:58:53 | 85 | 1 |
3 | 44 | 2021-06-20 04:05:36 | 2021-06-21 04:05:36 | 2021-06-22 04:05:36 | 85 | 2 |
4 | 33 | 2021-06-21 04:05:36 | 2021-06-22 04:05:36 | 2021-06-22 03:58:53 | 85 | 2 |
Can i use termux