On Thu, Oct 15, 2009 at 7:03 PM, SmileyChris <smileych...@gmail.com> wrote: > If we are to slowly deprecate this functionality, I think that we > should do effectively the same thing. > Leave user messages as-is and use something like this as the default > message storage:
Just to make sure I understand this correctly, let me try to summarize what this would mean: * the proposed app controls {{ messages }} and is responsible for retrieving anything set in the Message model * old apps that call user.message_set.create will still get their messages to the screen, assuming the project uses {{ messages }} in the template * old apps that call get_and_delete_messages or iterate through the Message.objects.all() manually will NOT see any messages that were stored in the session or a cookie, but they will continue to see messages created the old way * judging from your code, the new app will NOT store any messages in the old Message model, it will only read them * the standard template code: {% if messages %} <ul> {% for message in messages %} <li>{{ message }}</li> {% endfor %} </ul> {% endif %} will continue to work untouched after the update. For those that choose to leverage it, a {{message.level}} (or otherwise named attribute) will also be available. * since we are tying ourselves to the {{ messages }} variable, this probably means that the app should be called 'messages'. There has been some hesitation about this. Are we in the clear now that we have a potential upgrade path from the old API? Or is there still concern about naming? -- Tobias McNulty Caktus Consulting Group, LLC P.O. Box 1454 Carrboro, NC 27510 (919) 951-0052 http://www.caktusgroup.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---