username = forms.CharField(max_length=100, widget=forms.TextInput(attrs={'placeholder': 'Логин', 'required': True}))
password = forms.CharField(label=_("Пароль"), widget=forms.PasswordInput(attrs={'placeholder': 'Пароль', 'required': True}))
if form.is_valid():
name = form.cleaned_data['name']
if Function.objects.filter(name=name, project=project_code).exists():
form.add_error('name', 'Already exist')