ba-thesis/app/medwings/forms.py

19 lines
444 B
Python
Raw Normal View History

2023-07-28 22:27:12 +01:00
from django import forms
2023-07-30 22:51:55 +01:00
from medwings.models import Profile, RespirationScoreRecord
2023-07-28 22:27:12 +01:00
class ProfileForm(forms.ModelForm):
class Meta:
model = Profile
fields = ['date_of_birth', 'sex']
widgets = {
'date_of_birth': forms.DateInput(attrs={'type': 'date'}),
}
2023-07-30 22:51:55 +01:00
class RespirationScoreForm(forms.ModelForm):
class Meta:
model = RespirationScoreRecord
fields = ['value_severity']