add nounform

This commit is contained in:
Tan, Kian-ting 2021-01-31 22:15:05 +08:00
parent f24e2abefd
commit 0d6c58947d

View file

@ -22,6 +22,31 @@ class EntryForm(forms.ModelForm):
'PostScript': '後註'
}
class NounForm(forms.ModelForm):
class Meta:
model = Meaning
fields = '__all__'
widgets = {
'Entry': forms.TextInput(attrs={'class': 'noun-form'}),
'Gender': forms.NumberInput(attrs={'class': 'noun-form'}),
'Decl_no': forms.NumberInput(attrs={'class': 'noun-form'}),
'Gsg': forms.TextInput(attrs={'class': 'noun-form'}),
'Npl': forms.TextInput(attrs={'class': 'noun-form'}),
'Gpl': forms.TextInput(attrs={'class': 'noun-form'}),
'Dsg': forms.TextInput(attrs={'class': 'noun-form'}),
}
labels = {
'Entry': '條目',
'Gender': '0 代表質詞)',
'Decl_no': '變格號碼',
'Gsg': '單屬',
'Npl': '複主',
'Gpl': '複屬',
'Dsg': '單與',
}
class MeaningForm(forms.ModelForm):
class Meta:
model = Meaning