Showing A Specific Message Using Django Message Framework
I am trying to only show one message, if it exists. I tried this but it isn't working: In view: messages.success(request, 'some message', extra_tags='account_activated') In tem
Solution 1:
First, it's message.tags and not message.tag. Second, message.tags will contain all of the tags for the message separated by spaces, and not just the extra_tags.
For your example, message.tags should equal 'account_activated success'.
See the source code here.
Post a Comment for "Showing A Specific Message Using Django Message Framework"