On Thu, Dec 3, 2009 at 9:18 AM, Waylan Limberg <way...@gmail.com> wrote:
> Looking though this patch I couldn't help but notice the new > get_messages function. What if a project has neither the > MessageMiddleware nor the contrib.auth app enabled? Sure a reusable > app could catch the error, but that error will change once all support > for user.messages are removed in 1.4. Shouldn't the call to > user.get_and_delete_messages be wrapped in a check that request.user > exists like the new add_message function does? > It already does: http://bitbucket.org/tobias.mcnulty/django-contrib-messages/src/e4da706e1152/django/contrib/messages/api.py#cl-38 get_and_delete_messages on AnonymousUser just returns an empty list: http://bitbucket.org/tobias.mcnulty/django-contrib-messages/src/e4da706e1152/django/contrib/auth/models.py#cl-370 IIRC this matches the behavior of the previous implementation. Am I missing something? <http://bitbucket.org/tobias.mcnulty/django-contrib-messages/src/tip/django/contrib/messages/api.py#cl-38> Cheers, Tobias -- 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-develop...@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.