#NEWLINE# def response_bulk( self , request , formset ) : #NEWLINE# #INDENT# model = self . model #NEWLINE# opts = model . _meta #NEWLINE# preserved_filters = self . get_preserved_filters ( request ) #NEWLINE# msg_dict = { #NEWLINE# #INDENT# 'name' : force_text ( opts . verbose_name ) , #NEWLINE# 'name_plural' : force_text ( opts . verbose_name_plural ) , #NEWLINE# #UNINDENT# } #NEWLINE# if ( IS_POPUP_VAR in request . POST ) : #NEWLINE# #INDENT# return self . response_bulk_popup ( request , ( list ( formset . queryset ) + formset . new_objects ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( '_addanother' in request . POST ) : #NEWLINE# #INDENT# msg = ( _ ( 'The %(name_plural)s were bulk added successfully. You may add another %(name)s below.' ) % msg_dict ) #NEWLINE# self . message_user ( request , msg , messages . SUCCESS ) #NEWLINE# redirect_url = reverse ( ( 'admin:%s_%s_add' % ( opts . app_label , opts . model_name ) ) , current_app = self . admin_site . name ) #NEWLINE# redirect_url = add_preserved_filters ( { #NEWLINE# #INDENT# 'preserved_filters' : preserved_filters , #NEWLINE# 'opts' : opts , #NEWLINE# #UNINDENT# } , request ) #NEWLINE# return HttpResponseRedirect ( redirect_url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = ( _ ( 'The %(name_plural)s were bulk added successfully.' ) % msg_dict ) #NEWLINE# self . message_user ( request , msg , messages . SUCCESS ) #NEWLINE# return self . response_post_save_add ( request , obj = None )