by paulsmith · 15y ago · 0 comments
Also, take a look at the render()[2] shortcut function to collapse the template loading, context settings, and rendering steps into one.
[1]: https://docs.djangoproject.com/en/1.3/ref/request-response/#... [2]: https://docs.djangoproject.com/en/1.3/topics/http/shortcuts/...
return methods[request.method](request, item_id)
with:
return request.method.lower(request, item_id)
https://docs.djangoproject.com/en/dev/topics/signing/
You can use this to store the session data with the user without having to consult a database and without fear that they will tamper with the id: