Simon Willison’s Weblog

Subscribe
Atom feed for messages

1 item tagged “messages”

2009

Towards a Standard for Django Session Messages. I completely agree that Django’s user.message_set (which I helped design) is unfit for purpose, but I don’t think sessions are the right solution for messages sent to users. A signed cookie containing either the full message or a key referencing the message body on the server is a much more generally useful solution as it avoids the need for a round trip to a persistent store entirely.

# 19th June 2009, 9:57 pm / django, sessions, messages, flash, signedcookies, cookies, python