#NEWLINE# def get( self , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        This renders the form or, if needed, does the http redirects.\n        ' #NEWLINE# step_url = kwargs . get ( 'step' , None ) #NEWLINE# if ( step_url is None ) : #NEWLINE# #INDENT# if ( 'reset' in self . request . GET ) : #NEWLINE# #INDENT# self . storage . reset ( ) #NEWLINE# self . storage . current_step = self . steps . first #NEWLINE# #UNINDENT# if self . request . GET : #NEWLINE# #INDENT# query_string = ( '?%s' % self . request . GET . urlencode ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# query_string = '' #NEWLINE# #UNINDENT# return redirect ( ( self . get_step_url ( self . steps . current ) + query_string ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( step_url == self . done_step_name ) : #NEWLINE# #INDENT# last_step = self . steps . last #NEWLINE# return self . render_done ( self . get_form ( step = last_step , data = self . storage . get_step_data ( last_step ) , files = self . storage . get_step_files ( last_step ) ) , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( step_url == self . steps . current ) : #NEWLINE# #INDENT# return self . render ( self . get_form ( data = self . storage . current_step_data , files = self . storage . current_step_files ) , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( step_url in self . get_form_list ( ) ) : #NEWLINE# #INDENT# self . storage . current_step = step_url #NEWLINE# return self . render ( self . get_form ( data = self . storage . current_step_data , files = self . storage . current_step_files ) , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . storage . current_step = self . steps . first #NEWLINE# return redirect ( self . get_step_url ( self . steps . first ) )