質問編集履歴

1

SearchFormのコードを追記しました

2019/10/30 23:47

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -116,6 +116,44 @@
116
116
 
117
117
 
118
118
 
119
+ ```python
120
+
121
+ # forms.py
122
+
123
+ class SearchForm(forms.Form):
124
+
125
+ search_text = forms.CharField(
126
+
127
+ label='Search',
128
+
129
+ required=True,
130
+
131
+ max_length=100,
132
+
133
+ help_text='required'
134
+
135
+ )
136
+
137
+
138
+
139
+ sorted_choice = (
140
+
141
+ ('Newest', 'Newest'),
142
+
143
+ ('Recent activity', 'Recent activity'),
144
+
145
+ ('Most votes', 'Most votes'),
146
+
147
+ ('Most frequent', 'Most frequent'),
148
+
149
+ )
150
+
151
+
152
+
153
+ ```
154
+
155
+
156
+
119
157
  お分かりの方、ご教示頂けますと幸いです。
120
158
 
121
159
  よろしくお願い致します。