Korean translation of http://www.djangoproject.com/documentation/tutorial4
<-- |
[../Tutorial3] |
[../Tutorial1] |
--> |
당신의 첫번째 장고 프로그램 만들기, part 4
이 문서는 Django 0.9.1을 다룬다. 구버전 : 0.90 docs
By Adrian Holovaty <holovaty@gmail.com>, Translated by [parkpro77]
간단한 형태 작성하기
마지막 튜토리얼로부터 투표 세부 템플릿 (poll detail template)을 업데이트하고 나서, 템플릿에 HTML <form> 요소를 포함하자:
<h1>{{ poll.question }}</h1>
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<form action="/polls/{{ poll.id }}/vote/" method="post">
{% for choice in poll.get_choice_list %}
<input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
<label for="choice{{ forloop.counter }}">{{ choice.choice }}</label><br />
{% endfor %}
<input type="submit" value="Vote" />
</form>빠른 요약:
Use generic views: Less code is better
BioHackersNet