GoogleのカレンダーのリマインダーのリピートセクションにあるようにDjangoでフォームを作成したいと思います。 HTML要素の Djangoのフォームでradiogroup selectとプレーンな入力を組み合わせる方法
class ReminderFlatForm(ModelForm):
WEEKS = (
(1, 'M'),
(2, 'T'),
(3, 'W'),
(4, 'T'),
(5, 'F'),
(6, 'S'),
(7, 'S'),
)
REPEATS_BY = (
(8, 'day of the month'),
(9, 'day of the week')
)
ENDS = (
(1, 'Never'),
(2, 'After <input type="text" id="after_id"> occuriencies'),
(3, '<input type="text" id="ondate_id">')
)
weeks = forms.MultipleChoiceField(
choices=WEEKS,
label="",
required=False,
widget=forms.CheckboxSelectMultiple
)
months = forms.MultipleChoiceField(
choices=REPEATS_BY,
label="",
required=False,
widget=forms.RadioSelect
)
ends = forms.MultipleChoiceField(
choices=ENDS,
label="Ends",
required=True,
widget=forms.RadioSelect
)
しかし、その代わりに、私はプレーンテキストを持っています。 どうすればDjangoのフォームでそれを行うことができますか?
また、私が重要なのは、クリスピーな形を使っています。
多くのTHX、私はただ純粋なHTMLを追加できるWebインスペクタに見て、それが – Denis