#NEWLINE# def get_form( model , converter , base_class = form . BaseForm , only = None , exclude = None , field_args = None , allow_pk = False , extra_fields = None ) : #NEWLINE# #INDENT# '\n        Create form from peewee model and contribute extra fields, if necessary\n    ' #NEWLINE# result = model_form ( model , base_class = base_class , only = only , exclude = exclude , field_args = field_args , allow_pk = allow_pk , converter = converter ) #NEWLINE# if extra_fields : #NEWLINE# #INDENT# for ( name , field ) in iteritems ( extra_fields ) : #NEWLINE# #INDENT# setattr ( extra_fields , name , form . recreate_field ( field ) ) #NEWLINE# #UNINDENT# #UNINDENT# return result