#NEWLINE# def render( self , context , instance , placeholder ) : #NEWLINE# #INDENT# '\n        Return the context to render a DialogFormPlugin\n        ' #NEWLINE# form_type = instance . glossary . get ( 'form_type' ) #NEWLINE# if form_type : #NEWLINE# #INDENT# form_type = AUTH_FORM_TYPES [ [ ft [ 0 ] for ft in AUTH_FORM_TYPES ] . index ( form_type ) ] #NEWLINE# try : #NEWLINE# #INDENT# FormClass = import_string ( form_type [ 2 ] ) #NEWLINE# #UNINDENT# except ( ImportError , IndexError ) : #NEWLINE# #INDENT# context [ 'form_name' ] = 'auth_form' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# context [ 'form_name' ] = FormClass . form_name #NEWLINE# context [ FormClass . form_name ] = FormClass ( ) #NEWLINE# #UNINDENT# #UNINDENT# context [ 'action' ] = instance . link #NEWLINE# return super ( ShopAuthenticationPlugin , self ) . render ( context , instance , placeholder )