author | Madhusudan.C.S <madhusudancs@gmail.com> |
Fri, 04 Feb 2011 16:38:21 +0530 | |
changeset 558 | fd3e6f5f01bd |
parent 435 | 1217d808d70f |
permissions | -rw-r--r-- |
424
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
{% load form_helpers %} |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
|
431
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
424
diff
changeset
|
3 |
<form action="{{ action_url }}" method="post" |
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
424
diff
changeset
|
4 |
{% if file_support %} |
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
424
diff
changeset
|
5 |
enctype="multipart/form-data" |
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
424
diff
changeset
|
6 |
{% else %} |
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
424
diff
changeset
|
7 |
> |
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
424
diff
changeset
|
8 |
{% endif %} |
424
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
{% csrf_token %} |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
<div id="form"> |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
{% for field in form %} |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
12 |
{% as_div_field field %} |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
13 |
{% endfor %} |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
14 |
<p class="submit"><button type="submit">{{ button_label }}</button></p> |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
15 |
</div> |
5ed0362bd674
Add templatetags for form handling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
16 |
</form> |