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