#NEWLINE# def response_post_save_add( self , request , obj ) : #NEWLINE# #INDENT# "\n        Figure out where to redirect after the 'Save' button has been pressed\n        when adding a new object.\n        " #NEWLINE# opts = self . model . _meta #NEWLINE# if self . has_change_permission ( request , None ) : #NEWLINE# #INDENT# post_url = reverse ( ( 'admin:%s_%s_changelist' % ( opts . app_label , opts . model_name ) ) , current_app = self . admin_site . name ) #NEWLINE# preserved_filters = self . get_preserved_filters ( request ) #NEWLINE# post_url = add_preserved_filters ( { #NEWLINE# #INDENT# 'preserved_filters' : preserved_filters , #NEWLINE# 'opts' : preserved_filters , #NEWLINE# #UNINDENT# } , post_url ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# post_url = reverse ( 'admin:index' , current_app = self . admin_site . name ) #NEWLINE# #UNINDENT# return HttpResponseRedirect ( post_url )