def make_parameterization_form(query_str):
 variables = find_variables(query_str)
 if (len(variables) > 0):
  class Form(forms.Form, ):
   for name in sorted(variables):
    locals()[name] = forms.CharField(required=True)
  return Form
 else:
  return None

def make_parameterization_form ( query_str ) : variables = find_variables ( query_str ) if ( len ( variables ) > 0 ) : class Form ( forms . Form , ) : for name in sorted ( variables ) : locals ( ) [ name ] = forms . CharField ( required = True ) return Form else : return None
creates a django form on the fly with arguments from the query .