19 lines
540 B
Python
19 lines
540 B
Python
from django import forms
|
|
|
|
from apps.workerslocation.models.workers_locations import WorkersLocation
|
|
|
|
|
|
class WorkerForm(forms.ModelForm):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.fields["name"].widget.attrs.update(
|
|
{"class": "form-control", "placeholder": "Наименование"}
|
|
)
|
|
self.fields["icon"].widget.attrs.update(
|
|
{"class": "form-control"}
|
|
)
|
|
|
|
class Meta:
|
|
model = WorkersLocation
|
|
fields = ("name", "icon")
|