add nounform
This commit is contained in:
parent
f24e2abefd
commit
0d6c58947d
1 changed files with 25 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue