"""Formulaires de gestion des données entrantes pour les gymnastes et accidents.""" from django import forms from .models import ( Jumper ) class JumperForm(forms.ModelForm): class Meta: model = Jumper fields = ( 'last_name', 'first_name', 'birthdate', 'gender', 'is_active', 'club', ) widgets = { "last_name": forms.TextInput( attrs={"class": "form-control", "placeholder": "Lastname"} ), "first_name": forms.TextInput( attrs={"class": "form-control", "placeholder": "Firstname"} ), "birthdate": forms.DateInput(attrs={"class": "form-control datepicker"}), "gender": forms.Select(attrs={"class": "form-control"}), "club": forms.HiddenInput(), } club_related = forms.CharField( widget=forms.TextInput( attrs={ "class": "form-control", "placeholder": "Searching club…", "data-ref": "#id_club", } ) )