from django import forms from apps.main.models.model_static_layer import StaticLayer class StaticLayerForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields["name"].widget.attrs.update( {"class": "form-control", "placeholder": "Введите имя слоя"} ) class Meta: model = StaticLayer fields = ("name", "file")