# Path: mutant/models/field/managers.py
# class FieldDefinitionManager(PolymorphicManager.from_queryset(FieldDefinitionQuerySet)):
#     def get_by_natural_key(self, app_label, model, name):
#         qs = self.select_subclasses()
#         return qs.get(model_def__app_label=app_label,
#                       model_def__model=model, name=name)
# 
#     def names(self):
#         qs = self.get_queryset()
#         return qs.order_by('name').values_list('name', flat=True)
# 
#     def create_with_default(self, default, **kwargs):
#         qs = self.get_queryset()
#         return qs.create_with_default(default, **kwargs)
# 
# Path: mutant/contrib/text/models.py
# class CharFieldDefinition(FieldDefinition):
#     max_length = fields.PositiveSmallIntegerField(
#         _('max length'), blank=True, null=True
#     )
# 
#     objects = FieldDefinitionManager()
# 
#     class Meta:
#         app_label = 'text'
#         defined_field_class = fields.CharField
#         defined_field_options = ('max_length',)
#         defined_field_description = _('String')
#         defined_field_category = _('Text')


from django.core.exceptions import ValidationError
from django.db.models import fields
from django.utils.translation import ugettext_lazy as _
from ...models import FieldDefinitionManager
from ..text.models import CharFieldDefinition




class _WebMeta:
    defined_field_category = _('Web')


class EmailFieldDefinition(CharFieldDefinition):
    class Meta(_WebMeta):
        app_label = 'web'
        proxy = True
        defined_field_class = fields.EmailField


class URLFieldDefinition(CharFieldDefinition):
    class Meta(_WebMeta):
        app_label = 'web'
        proxy = True
        defined_field_class = fields.URLField


class SlugFieldDefinition(CharFieldDefinition):
    class Meta(_WebMeta):
        app_label = 'web'
        proxy = True
        defined_field_class = fields.SlugField
        defined_field_description = _('slug')



# Path: mutant/models/field/managers.py
# class FieldDefinitionManager(PolymorphicManager.from_queryset(FieldDefinitionQuerySet)):
#     def get_by_natural_key(self, app_label, model, name):
#         qs = self.select_subclasses()
#         return qs.get(model_def__app_label=app_label,
#                       model_def__model=model, name=name)
# 
#     def names(self):
#         qs = self.get_queryset()
#         return qs.order_by('name').values_list('name', flat=True)
# 
#     def create_with_default(self, default, **kwargs):
#         qs = self.get_queryset()
#         return qs.create_with_default(default, **kwargs)
# 
# Path: mutant/contrib/text/models.py
# class CharFieldDefinition(FieldDefinition):
#     max_length = fields.PositiveSmallIntegerField(
#         _('max length'), blank=True, null=True
#     )
# 
#     objects = FieldDefinitionManager()
# 
#     class Meta:
#         app_label = 'text'
#         defined_field_class = fields.CharField
#         defined_field_options = ('max_length',)
#         defined_field_description = _('String')
#         defined_field_category = _('Text')


# Path: mutant/contrib/web/models.py
from django.core.exceptions import ValidationError
from django.db.models import fields
from django.utils.translation import ugettext_lazy as _
from ...models import FieldDefinitionManager
from ..text.models import CharFieldDefinition





class _WebMeta:
    defined_field_category = _('Web')


class EmailFieldDefinition(CharFieldDefinition):
    class Meta(_WebMeta):
        app_label = 'web'
        proxy = True
        defined_field_class = fields.EmailField


class URLFieldDefinition(CharFieldDefinition):
    class Meta(_WebMeta):
        app_label = 'web'
        proxy = True
        defined_field_class = fields.URLField


class SlugFieldDefinition(CharFieldDefinition):
    class Meta(_WebMeta):
        app_label = 'web'
        proxy = True
        defined_field_class = fields.SlugField
        defined_field_description = _('slug')



class IPAddressFieldDefinition(CharFieldDefinition):