Hi all -

I am using the messages framework to notify users when another user
has commented on their profile or on an item they've posted. I was
pretty excited to see that such an infrastructure was included with
the authentication system out of the box. However, I was disappointed
to see that the only way to retrieve messages was via a get _and_
delete operation, so each get (or reference to "messages" in a
template) emptied the queue.

I'd like to add some persistence to the messaging so that the queue is
flushed only when I specifically request it. But I'm not sure how best
to do it. My inclination would be to add something to my Profile model
and populate it with calls to get_and_delete_messages() at appropriate
times and never use "messages" in my templates at all, but rather just
pass the persistent object to the template.

Is there a better way to support Message persistence? Or should I just
build my own model to support this kind of thing? Rolling my own seems
fairly trivial since I'm already grabbing all the required information
anyway. But if it's not necessary, I'm not gonna do it.

- Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to