Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
load standard user settings per view
21 views
Skip to first unread message
sebasti...@gmail.com
unread,
Mar 19, 2021, 10:56:54 AM
3/19/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 PM
3/20/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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