#NEWLINE# def view( self , request , extra_context = None , process_form = True ) : #NEWLINE# #INDENT# form = extra_context [ 'form' ] #NEWLINE# if ( form . is_valid ( ) and process_form ) : #NEWLINE# #INDENT# if ( '_export_mail' in request . POST ) : #NEWLINE# #INDENT# message = _ ( ( 'The export has been generated and will be emailed                             to %s.' % request . user . email ) ) #NEWLINE# messages . add_message ( request , messages . SUCCESS , message ) #NEWLINE# self . mail_response ( request , extra_context ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . export_response ( form ) #NEWLINE# #UNINDENT# #UNINDENT# adminform = helpers . AdminForm ( form , form . fieldsets , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# context = { #NEWLINE# #INDENT# 'adminform' : adminform , #NEWLINE# #UNINDENT# } #NEWLINE# context . update ( ( extra_context or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) #NEWLINE# context_instance = template . RequestContext ( request ) #NEWLINE# return render_to_response ( 'export/export_form.html' , context , context_instance = context_instance )