django-notification[1] is a django app for managing the notification of events like "Jacob has accepted your friend request" over multiple media (email, feeds, web page) regardless of which app was responsible for the app.
At the moment the notification message is just a text field but I'd like it to be able to contain links to objects, for example to allow "Jacob" to be a link to Jacob's profile page when the notice appears on a web page or feed. I'm considering changing the object to, instead of having just a text field, have a string template and a list of objects. So in the example I've been using, the string template would be something like "{0} has accepted your friend request" and the list of objects would be [<User: Jacob>]. The question is then how to capture the list of arbitrary objects in the model. I was thinking of using another text field containing delimited pairs of model name (or content type) and id. So there would be a string template field with "{0} has accepted your friend request" and an object list field that would be serialized as "auth.user:3", or in the case of multiple objects, something like "auth.user:3| another.model:id|..." Thoughts on this approach? James [1] http://code.google.com/p/django-notification/ -- James Tauber http://jtauber.com/ journeyman of some http://jtauber.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---