from server.manage.switch.forms.media import *
from server.ground.catalog.models import *


class Form_Catalog(Abstract_Image_Form):

    def clean(self):
        name = self.data['name']
        parent = self.request.session['catalog_parent']
        children = SQL.Filter(Model_Catalog, parent=parent)
        if children.filter(name=name):
            raise forms.ValidationError(Text(self, 155))
        return Abstract_Image_Form.clean(self)

    def Create_Fields(self):
        self.fields['name'] = forms.CharField(max_length=100)
        Abstract_Image_Form.Create_Fields(self)

    def Set_Widgets(self):
        name_attr = self.Attr(Text(self, 164), autofocus=True)
        self.fields['name'].widget = forms.TextInput(attrs=name_attr)
        Abstract_Image_Form.Set_Widgets(self)

30c734695d340b0bedae27437a4bc6611cfb7352
<mask token>


class Form_Catalog(Abstract_Image_Form):

    def clean(self):
        name = self.data['name']
        parent = self.request.session['catalog_parent']
        children = SQL.Filter(Model_Catalog, parent=parent)
        if children.filter(name=name):
            raise forms.ValidationError(Text(self, 155))
        return Abstract_Image_Form.clean(self)
    <mask token>
    <mask token>

<mask token>


class Form_Catalog(Abstract_Image_Form):

    def clean(self):
        name = self.data['name']
        parent = self.request.session['catalog_parent']
        children = SQL.Filter(Model_Catalog, parent=parent)
        if children.filter(name=name):
            raise forms.ValidationError(Text(self, 155))
        return Abstract_Image_Form.clean(self)

    def Create_Fields(self):
        self.fields['name'] = forms.CharField(max_length=100)
        Abstract_Image_Form.Create_Fields(self)
    <mask token>

<mask token>


class Form_Catalog(Abstract_Image_Form):

    def clean(self):
        name = self.data['name']
        parent = self.request.session['catalog_parent']
        children = SQL.Filter(Model_Catalog, parent=parent)
        if children.filter(name=name):
            raise forms.ValidationError(Text(self, 155))
        return Abstract_Image_Form.clean(self)

    def Create_Fields(self):
        self.fields['name'] = forms.CharField(max_length=100)
        Abstract_Image_Form.Create_Fields(self)

    def Set_Widgets(self):
        name_attr = self.Attr(Text(self, 164), autofocus=True)
        self.fields['name'].widget = forms.TextInput(attrs=name_attr)
        Abstract_Image_Form.Set_Widgets(self)

from server.manage.switch.forms.media import *
from server.ground.catalog.models import *


class Form_Catalog(Abstract_Image_Form):

    def clean(self):
        name = self.data['name']
        parent = self.request.session['catalog_parent']
        children = SQL.Filter(Model_Catalog, parent=parent)
        if children.filter(name=name):
            raise forms.ValidationError(Text(self, 155))
        return Abstract_Image_Form.clean(self)

    def Create_Fields(self):
        self.fields['name'] = forms.CharField(max_length=100)
        Abstract_Image_Form.Create_Fields(self)

    def Set_Widgets(self):
        name_attr = self.Attr(Text(self, 164), autofocus=True)
        self.fields['name'].widget = forms.TextInput(attrs=name_attr)
        Abstract_Image_Form.Set_Widgets(self)
