init commit
This commit is contained in:
18
base/forms.py
Normal file
18
base/forms.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from django import forms
|
||||
from .models import Patient
|
||||
|
||||
|
||||
class PatientCreateForm(forms.Form):
|
||||
|
||||
|
||||
name = forms.CharField()
|
||||
nationalID = forms.CharField()
|
||||
description = forms.CharField(widget=forms.Textarea)
|
||||
image = forms.ImageField(required=True)
|
||||
|
||||
|
||||
class PatientUpdateForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = Patient
|
||||
fields = ('name', 'nationalID', 'description', 'image')
|
||||
Reference in New Issue
Block a user