# Path: flask_superadmin/form.py
# class BaseForm(wtf.Form):
# class TimeField(fields.Field):
# class ChosenSelectWidget(widgets.Select):
# class ChosenSelectField(fields.SelectField):
# class FileFieldWidget(object):
# class FileField(fields.FileField):
# class DatePickerWidget(widgets.TextInput):
# class DateTimePickerWidget(widgets.TextInput):
#     def __init__(self, formdata=None, obj=None, prefix='', **kwargs):
#     def has_file_field(self):
#     def __init__(self, label=None, validators=None, formats=None, **kwargs):
#     def _value(self):
#     def process_formdata(self, valuelist):
#     def __call__(self, field, **kwargs):
#     def __call__(self, field, **kwargs):
#     def __init__(self,*args,**kwargs):
#     def process(self, formdata, data=fields._unset_value):
#     def clear(self):
#     def data(self):
#     def data(self, data):
#     def __call__(self, field, **kwargs):
#     def __call__(self, field, **kwargs):


from wtforms import fields as f
from wtforms import Form
from wtforms import validators
from wtforms.ext.django.fields import ModelSelectField
from flask_superadmin import form
            from django.contrib.localflavor.us.us_states import STATE_CHOICES


__all__ = (
    'AdminModelConverter', 'model_fields', 'model_form'
)


class ModelConverterBase(object):
    def __init__(self, converters):
        self.converters = converters

    def convert(self, model, field, field_args):
        kwargs = {
            'label': field.verbose_name,
            'description': field.help_text,
            'validators': [],
            'filters': [],
            'default': field.default,
        }
        if field_args:
            kwargs.update(field_args)

        if field.blank:
            kwargs['validators'].append(validators.Optional())
        if field.max_length is not None and field.max_length > 0:
            kwargs['validators'].append(validators.Length(max=field.max_length))

        ftype = type(field).__name__
        if field.choices:
            kwargs['choices'] = field.choices

# Path: flask_superadmin/form.py
# class BaseForm(wtf.Form):
# class TimeField(fields.Field):
# class ChosenSelectWidget(widgets.Select):
# class ChosenSelectField(fields.SelectField):
# class FileFieldWidget(object):
# class FileField(fields.FileField):
# class DatePickerWidget(widgets.TextInput):
# class DateTimePickerWidget(widgets.TextInput):
#     def __init__(self, formdata=None, obj=None, prefix='', **kwargs):
#     def has_file_field(self):
#     def __init__(self, label=None, validators=None, formats=None, **kwargs):
#     def _value(self):
#     def process_formdata(self, valuelist):
#     def __call__(self, field, **kwargs):
#     def __call__(self, field, **kwargs):
#     def __init__(self,*args,**kwargs):
#     def process(self, formdata, data=fields._unset_value):
#     def clear(self):
#     def data(self):
#     def data(self, data):
#     def __call__(self, field, **kwargs):
#     def __call__(self, field, **kwargs):


# Path: flask_superadmin/model/backends/django/orm.py
from wtforms import fields as f
from wtforms import Form
from wtforms import validators
from wtforms.ext.django.fields import ModelSelectField
from flask_superadmin import form
            from django.contrib.localflavor.us.us_states import STATE_CHOICES



__all__ = (
    'AdminModelConverter', 'model_fields', 'model_form'
)


class ModelConverterBase(object):
    def __init__(self, converters):
        self.converters = converters

    def convert(self, model, field, field_args):
        kwargs = {
            'label': field.verbose_name,
            'description': field.help_text,
            'validators': [],
            'filters': [],
            'default': field.default,
        }
        if field_args:
            kwargs.update(field_args)

        if field.blank:
            kwargs['validators'].append(validators.Optional())
        if field.max_length is not None and field.max_length > 0:
            kwargs['validators'].append(validators.Length(max=field.max_length))

        ftype = type(field).__name__
        if field.choices:
            kwargs['choices'] = field.choices

            return f.SelectField(widget=form.ChosenSelectWidget(), **kwargs)