load standard user settings per view

21 views
Skip to first unread message

sebasti...@gmail.com

unread,
Mar 19, 2021, 10:56:54 AM3/19/21
to Django users
Hello,

i have a addresslistview that also take parameter like pagingsize and ordering over url. For example https://localhost:8000/addresslist?pagingsize=25&ordering=Id

Now when a user get a request like https://localhost:8000/addresslist?pagingsize=25&ordering=Id then parameter ?pagingsize=25&ordering=Id is stored in a user settings cache and when next time user call https://localhost:8000/addresslist without parameter then the settings from cache is set.

How can i make this without many querys on database...

Ryan Nowakowski

unread,
Mar 20, 2021, 6:33:03 PM3/20/21
to django...@googlegroups.com
I'd store the query parameters in the user's session:

https://docs.djangoproject.com/en/3.1/topics/http/sessions/#examples
Reply all
Reply to author
Forward
0 new messages