|
|
@ -1,5 +1,5 @@ |
|
|
|
from django.core.exceptions import ValidationError |
|
|
|
from django.forms import ModelForm |
|
|
|
from django.forms import ModelForm, Textarea |
|
|
|
from .models import OdpovedUcastnika, SpravnaOdpoved |
|
|
|
|
|
|
|
|
|
|
@ -7,6 +7,9 @@ class SifrovackaForm(ModelForm): |
|
|
|
class Meta: |
|
|
|
model = OdpovedUcastnika |
|
|
|
fields = ["sifra", "odpoved", ] |
|
|
|
widgets = { |
|
|
|
"odpoved": Textarea(attrs={'rows': 1, 'cols': 30}), |
|
|
|
} |
|
|
|
|
|
|
|
def clean_sifra(self): |
|
|
|
sifra = self.cleaned_data.get('sifra') |
|
|
|