You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
391 B

from django.forms import ModelForm
from .models import UcastnikVyroci
class UcastnikVyrociForm(ModelForm):
class Meta:
model = UcastnikVyroci
fields = "__all__"
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for field in ["kdy", "cojemam", "cislo", "dodat"]:
self.fields[field].widget.attrs['rows'] = 2
self.fields[field].widget.attrs['cols'] = 22