#NEWLINE# @ never_cache #NEWLINE# def add( request , message_type ) : #NEWLINE# #INDENT# fail_silently = request . POST . get ( 'fail_silently' , None ) #NEWLINE# for msg in request . POST . getlist ( 'messages' ) : #NEWLINE# #INDENT# if ( fail_silently is not None ) : #NEWLINE# #INDENT# getattr ( messages , message_type ) ( request , msg , fail_silently = fail_silently ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# getattr ( messages , message_type ) ( fail_silently , msg ) #NEWLINE# #UNINDENT# #UNINDENT# show_url = reverse ( 'django.contrib.messages.tests.urls.show' ) #NEWLINE# return HttpResponseRedirect ( show_url )