# Path: formunculous/fields.py
# EMPTY_VALUES = (None, '',)
# class HoneypotField(Field):
# class DocumentFormField(FileField):
# class DocumentField(models.FileField):
# class USZipCodeModelField(models.CharField):
# class USZipCodeField(RegexField):
# class MultipleChoiceToStringField(MultipleChoiceField):
#     def clean(self, value):
#     def __init__(self, *args, **kwargs):
#     def clean(self, data, initial=None):
#     def formfield(self, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def formfield(self, **kwargs):
#     def __init__(self, max_length=None, min_length=None, *args, **kwargs):
#     def clean(self, value):


from django.db import models
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from django.contrib.contenttypes.models import ContentType
from localflavor.us.forms import USStateSelect
from localflavor.us.models import PhoneNumberField
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
from django import forms
from django.conf import settings
from formunculous.widgets import *
from formunculous.storage import *
from formunculous import fields
        from django.core.exceptions import ImproperlyConfigured 
import datetime
        import formunculous.models as funcmodels
        import formunculous.models as funcmodels
                             blank=True, null=True,max_length=100)
    widget = FileWidget
    allow_dropdown = False

class ImageField(BaseField):
    """
       This is a file field that only accepts common image formats.
    """

    FieldDefinition.field_types+=('ImageField','Picture Upload',),

    name = 'Picture Upload'
    icon = 'formunculous/img/field_icons/picture.png'

    value = models.ImageField(upload_to=upload_to_path, 
                             storage=ApplicationStorage(),
                             blank=True, null=True, max_length=100)
    widget = FileWidget
    allow_dropdown = False

class DocumentField(BaseField):
    """
       Validates common document mime-types/extensions
    """

    FieldDefinition.field_types+=('DocumentField', 'Document Upload',),
    
    name = "Document Upload"
    icon = 'formunculous/img/field_icons/document.png'


# Path: formunculous/fields.py
# EMPTY_VALUES = (None, '',)
# class HoneypotField(Field):
# class DocumentFormField(FileField):
# class DocumentField(models.FileField):
# class USZipCodeModelField(models.CharField):
# class USZipCodeField(RegexField):
# class MultipleChoiceToStringField(MultipleChoiceField):
#     def clean(self, value):
#     def __init__(self, *args, **kwargs):
#     def clean(self, data, initial=None):
#     def formfield(self, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def formfield(self, **kwargs):
#     def __init__(self, max_length=None, min_length=None, *args, **kwargs):
#     def clean(self, value):


# Path: formunculous/models.py
from django.db import models
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from django.contrib.contenttypes.models import ContentType
from localflavor.us.forms import USStateSelect
from localflavor.us.models import PhoneNumberField
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
from django import forms
from django.conf import settings
from formunculous.widgets import *
from formunculous.storage import *
from formunculous import fields
        from django.core.exceptions import ImproperlyConfigured 
import datetime
        import formunculous.models as funcmodels
        import formunculous.models as funcmodels

                             blank=True, null=True,max_length=100)
    widget = FileWidget
    allow_dropdown = False

class ImageField(BaseField):
    """
       This is a file field that only accepts common image formats.
    """

    FieldDefinition.field_types+=('ImageField','Picture Upload',),

    name = 'Picture Upload'
    icon = 'formunculous/img/field_icons/picture.png'

    value = models.ImageField(upload_to=upload_to_path, 
                             storage=ApplicationStorage(),
                             blank=True, null=True, max_length=100)
    widget = FileWidget
    allow_dropdown = False

class DocumentField(BaseField):
    """
       Validates common document mime-types/extensions
    """

    FieldDefinition.field_types+=('DocumentField', 'Document Upload',),
    
    name = "Document Upload"
    icon = 'formunculous/img/field_icons/document.png'


    value = fields.DocumentField(upload_to=upload_to_path, 