2
A
回答
6
使用会话:https://docs.djangoproject.com/en/1.8/topics/http/sessions/
然后像做:
def my_view(request, *args, **kwargs):
if request.session.get('visited', False):
# response without the welcome message
else:
request.session['visited'] = True
# response with the welcome message
对于会话相关的设置(例如到期),见https://docs.djangoproject.com/en/1.8/topics/http/sessions/#browser-length-sessions-vs-persistent-sessions
喜RZ,这是截止日期为这个会议? – panchicore 2010-06-09 02:58:27
链接似乎已损坏 – 2014-07-23 13:13:00
链接已修复。 – 2015-11-29 19:36:36