# Path: iktomi/forms/convs.py
# class ValidationError(Exception):
# class Converter(object):
# class validator(object):
# class length(object):
# class CharBased(Converter):
# class Char(CharBased):
# class Int(Converter):
# class Bool(Converter):
# class EnumChoice(Converter):
# class BaseDatetime(CharBased):
# class Datetime(BaseDatetime):
# class Date(BaseDatetime):
# class Time(BaseDatetime):
# class DisplayOnly(Converter):
# class SplitDateTime(Converter):
# class Html(Char):
#     class Nothing: pass
# class List(Converter):
# class ListOf(Converter):
# class FieldBlockConv(Converter):
# class SimpleFile(Converter):
# class Email(Char):
# class ModelDictConv(Converter):
# class OptionLabel(six.text_type):
# class ModelChoice(EnumChoice):
#     def __init__(self, message=None, by_field=None, format_args=None):
#     def translate(self, env, message):
#     def fill_errors(self, field):
#     def __repr__(self):
#     def __init__(self, *args, **kwargs):
#     def env(self):
#     def _is_empty(self, value):
#     def accept(self, value, silent=False):
#     def to_python(self, value):
#     def from_python(self, value):
#     def __call__(self, *args, **kwargs):
#     def assert_(self, expression, msg):
#     def _existing_value(self):
#     def __repr__(self):
#     def __init__(self, message):
#     def __call__(self, func):
#         def wrapper(conv, value):
#     def __init__(self, min_length, max_length):
#     def __call__(self, conv, value):
# def limit(min_length, max_length):
# def between(min_value, max_value):
#     def wrapper(conv, value):
# def num_limit(min_value, max_value):
#     def clean_value(self, value):
#     def max_length(self):
#     def to_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def from_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def options(self):
#     def __init__(self, *args, **kwargs):
#     def from_python(self, value):
#     def to_python(self, value):
#     def convert_datetime(self, value):
#     def convert_datetime(self, value):
#     def from_python(self, value):
#     def convert_datetime(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def _load_arg(cls, opt):
#     def __init__(self, *args, **kwargs):
#     def clean_value(self, value):
#     def cleaner(self):
#     def from_python(self, value):
#     def to_python(self, value):
#     def __init__(self, *args, **kwargs):
#     def to_python(self, value):
#     def from_python(self, value):
#     def _existing_value(self):
#     def _is_empty(self, file):
#     def to_python(self, file):
#     def from_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def _existing_value(self):
#     def __init__(self, *args, **kwargs):
#     def query(self):
#     def from_python(self, value):
#     def to_python(self, value):
#     def get_object_label(self, obj):
#     def options(self):
#     PROPERTIES = ['allowed_elements', 'allowed_attributes', 'allowed_protocols',
#                   'allowed_classes', 'dom_callbacks', 'drop_empty_tags',
#                   'wrap_inline_tags', 'split_paragraphs_by_br']
#     LIST_PROPERTIES = ['allowed_elements', 'allowed_attributes',
#                        'allowed_protocols', 'dom_callbacks',
#                        'drop_empty_tags', 'tags_to_wrap']
# 
# Path: iktomi/forms/widgets.py
# class Widget(object):
# class TextInput(Widget):
# class Textarea(Widget):
# class HiddenInput(Widget):
# class PasswordInput(Widget):
# class Select(Widget):
# class CheckBoxSelect(Select):
# class CheckBox(Widget):
# class CharDisplay(Widget):
# class AggregateWidget(Widget):
# class FieldListWidget(AggregateWidget):
# class FieldSetWidget(AggregateWidget):
# class FieldBlockWidget(FieldSetWidget):
# class FileInput(Widget):
#     def __init__(self, field=None, **kwargs):
#     def multiple(self):
#     def input_name(self):
#     def id(self):
#     def env(self):
#     def prepare_data(self):
#     def get_raw_value(self):
#     def render(self):
#     def __call__(self, **kwargs):
#     def get_options(self, value):
#     def prepare_data(self):
#     def prepare_data(self):
#     def get_raw_value(self):
#     def render_template_field(self):


from iktomi.forms import Form, convs, widgets
from iktomi.forms.fields import Field
from iktomi.unstable.forms.files import FileFieldSet, FileFieldSetConv
# -*- coding: utf-8 -*-



def check_terms(conv, value):
    if not value:
        raise convs.ValidationError('Please, accept the terms os service')
    return value


class FileForm(Form):

    fields = [
        Field('accept',
              label='I accept the terms of service',

# Path: iktomi/forms/convs.py
# class ValidationError(Exception):
# class Converter(object):
# class validator(object):
# class length(object):
# class CharBased(Converter):
# class Char(CharBased):
# class Int(Converter):
# class Bool(Converter):
# class EnumChoice(Converter):
# class BaseDatetime(CharBased):
# class Datetime(BaseDatetime):
# class Date(BaseDatetime):
# class Time(BaseDatetime):
# class DisplayOnly(Converter):
# class SplitDateTime(Converter):
# class Html(Char):
#     class Nothing: pass
# class List(Converter):
# class ListOf(Converter):
# class FieldBlockConv(Converter):
# class SimpleFile(Converter):
# class Email(Char):
# class ModelDictConv(Converter):
# class OptionLabel(six.text_type):
# class ModelChoice(EnumChoice):
#     def __init__(self, message=None, by_field=None, format_args=None):
#     def translate(self, env, message):
#     def fill_errors(self, field):
#     def __repr__(self):
#     def __init__(self, *args, **kwargs):
#     def env(self):
#     def _is_empty(self, value):
#     def accept(self, value, silent=False):
#     def to_python(self, value):
#     def from_python(self, value):
#     def __call__(self, *args, **kwargs):
#     def assert_(self, expression, msg):
#     def _existing_value(self):
#     def __repr__(self):
#     def __init__(self, message):
#     def __call__(self, func):
#         def wrapper(conv, value):
#     def __init__(self, min_length, max_length):
#     def __call__(self, conv, value):
# def limit(min_length, max_length):
# def between(min_value, max_value):
#     def wrapper(conv, value):
# def num_limit(min_value, max_value):
#     def clean_value(self, value):
#     def max_length(self):
#     def to_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def from_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def options(self):
#     def __init__(self, *args, **kwargs):
#     def from_python(self, value):
#     def to_python(self, value):
#     def convert_datetime(self, value):
#     def convert_datetime(self, value):
#     def from_python(self, value):
#     def convert_datetime(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def _load_arg(cls, opt):
#     def __init__(self, *args, **kwargs):
#     def clean_value(self, value):
#     def cleaner(self):
#     def from_python(self, value):
#     def to_python(self, value):
#     def __init__(self, *args, **kwargs):
#     def to_python(self, value):
#     def from_python(self, value):
#     def _existing_value(self):
#     def _is_empty(self, file):
#     def to_python(self, file):
#     def from_python(self, value):
#     def from_python(self, value):
#     def to_python(self, value):
#     def _existing_value(self):
#     def __init__(self, *args, **kwargs):
#     def query(self):
#     def from_python(self, value):
#     def to_python(self, value):
#     def get_object_label(self, obj):
#     def options(self):
#     PROPERTIES = ['allowed_elements', 'allowed_attributes', 'allowed_protocols',
#                   'allowed_classes', 'dom_callbacks', 'drop_empty_tags',
#                   'wrap_inline_tags', 'split_paragraphs_by_br']
#     LIST_PROPERTIES = ['allowed_elements', 'allowed_attributes',
#                        'allowed_protocols', 'dom_callbacks',
#                        'drop_empty_tags', 'tags_to_wrap']
# 
# Path: iktomi/forms/widgets.py
# class Widget(object):
# class TextInput(Widget):
# class Textarea(Widget):
# class HiddenInput(Widget):
# class PasswordInput(Widget):
# class Select(Widget):
# class CheckBoxSelect(Select):
# class CheckBox(Widget):
# class CharDisplay(Widget):
# class AggregateWidget(Widget):
# class FieldListWidget(AggregateWidget):
# class FieldSetWidget(AggregateWidget):
# class FieldBlockWidget(FieldSetWidget):
# class FileInput(Widget):
#     def __init__(self, field=None, **kwargs):
#     def multiple(self):
#     def input_name(self):
#     def id(self):
#     def env(self):
#     def prepare_data(self):
#     def get_raw_value(self):
#     def render(self):
#     def __call__(self, **kwargs):
#     def get_options(self, value):
#     def prepare_data(self):
#     def prepare_data(self):
#     def get_raw_value(self):
#     def render_template_field(self):


# Path: examples/filefield/forms.py
from iktomi.forms import Form, convs, widgets
from iktomi.forms.fields import Field
from iktomi.unstable.forms.files import FileFieldSet, FileFieldSetConv

# -*- coding: utf-8 -*-



def check_terms(conv, value):
    if not value:
        raise convs.ValidationError('Please, accept the terms os service')
    return value


class FileForm(Form):

    fields = [
        Field('accept',
              label='I accept the terms of service',

              conv=convs.Bool(check_terms),