#NEWLINE# def get_form( self , request , obj = None , **kwargs ) : #NEWLINE# #INDENT# '\n        Returns a Form class for use in the admin add view. This is used by\n        add_view and change_view.\n        ' #NEWLINE# if ( 'fields' in kwargs ) : #NEWLINE# #INDENT# fields = kwargs . pop ( 'fields' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fields = flatten_fieldsets ( self . get_fieldsets ( request , obj ) ) #NEWLINE# #UNINDENT# exclude = ( ( tuple ( ( self . exclude or ( ) ) ) + tuple ( kwargs . pop ( 'exclude' , ( ) ) ) ) + self . get_readonly_fields ( request , obj ) ) #NEWLINE# old_formfield_callback = curry ( self . formfield_for_dbfield , request = request ) #NEWLINE# defaults = { #NEWLINE# #INDENT# 'form' : self . form , #NEWLINE# 'fields' : fields , #NEWLINE# 'exclude' : exclude , #NEWLINE# 'formfield_callback' : old_formfield_callback , #NEWLINE# #UNINDENT# } #NEWLINE# defaults . update ( kwargs ) #NEWLINE# language = self . _language ( request ) #NEWLINE# return translatable_modelform_factory ( language , self . model , ** defaults )