내 템플릿에 드롭 다운 메뉴를 표시하기 위해 노력하고있어 정의,하지만 난장고 1.6 이름은
여기File "forms.py" in DropdownSelectionForm
101. selection = forms.ChoiceField(choices=MY_CHOICES, widget = Select)
Exception Type: NameError at/
Exception Value: name 'Select' is not defined
내가 양식을 보여주기 위해 노력하고있어 템플릿입니다 다음과 같은 오류를 얻을하지 않습니다
여기<form action="/doclistings/" method="post" >{% csrf_token %}
<select class="form-control" id="s1" NAME="selection">
<option><b>Find a Doctor...</b></option>
{% for value, text in form.selection.field.choices %}
<option value="{{ value }}">{{ text }}</option>
{% endfor %}
</select>
는 forms.py입니다
MY_CHOICES = (
('Dermatologist', 'Dermatologist'),
('Dentist', 'Dentist'),
('Opthalmologist', 'Opthalmologist'),
)
class DropdownSelectionForm(forms.Form):
selection = forms.ChoiceField(choices=MY_CHOICES, widget = Select)
Select
을 찾을 수 없습니다, 당신이을 가져온 참조