21 lines
498 B
Python
21 lines
498 B
Python
from django.forms import ModelForm
|
|
|
|
from gym.models import Round
|
|
|
|
|
|
class RoundForm(ModelForm):
|
|
class Meta:
|
|
model = Round
|
|
fields = [
|
|
"equipment",
|
|
"session",
|
|
"theoretical_max_percentage",
|
|
"chosen_weight",
|
|
"repetition_number",
|
|
"work_form",
|
|
"notes",
|
|
]
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.fields["notes"].widget.attrs["rows"] = 3
|