django-sessions
Session database table cleanup
Does this table need to be purged or is it taken care of 开发者_开发百科automatically by Django?Django does NOT provide automatic purging. There is however a handy command available to help you do it[详细]
2023-04-02 10:55 分类:问答Django : make a variable persistent
Basically I want to make a variable persitent in Django and I don\'t know how. To be more precise, I want a user to choose a specific project when he logs in the site (via a ChoiceField for example).[详细]
2023-03-30 02:33 分类:问答Is there simple way to encode json data in Django? [closed]
It开发者_运维技巧9;s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.[详细]
2023-03-26 03:58 分类:问答Django: determine which user is deleting when using post_delete signal
I want admins to be notified when certain objects are deleted but I also want to determine which user is performing the delete.[详细]
2023-03-23 13:43 分类:问答Django logout and redirect after inactivity
By setting SESSION_COOKIE_AGE and turning SESSION_SAVE_EVERY_REQUEST, it will log people out after a certain time of inactivity. But is there anyway to r开发者_开发问答edirect after say 5 mins of inac[详细]
2023-03-17 07:13 分类:问答Django-Secretballot does not work?
I am using Django-secretballot app which allows anonymous voting. First we register a model for secret voting and then there is a function add_vote() which takes 2 arguments. \'Token\' and vote value([详细]
2023-03-06 16:46 分类:问答How to create Django like button for anonymous users?
I 开发者_StackOverflow社区am using Django and my website has no user profiles so all are anonymous. I want to implement a \'like\' system. How do I restrict a user to like only once. Thanks.If you don[详细]
2023-03-06 04:44 分类:问答Django: any way to avoid querying for request.user on every request?
For my website pretty much every page has a header bar displaying \"Welcome开发者_如何学编程, ABC\" where \"ABC\" is the username. That means request.user will be called for every single request resul[详细]
2023-03-04 19:20 分类:问答Testing a session variable
I came across Django request.session; I know how to set and test it for a specific value. request.session[\'name\'] = "dummy"[详细]
2023-03-04 14:35 分类:问答Use Django context processor or middleware to check for cookies on templates?
My Django app has Post ob开发者_高级运维jects. Each Post has an IntegerField that gets incremented whenever a certain link is clicked. When that link is clicked, I set a cookie to indicate that it has[详细]
2023-03-03 15:08 分类:问答