Add a template example in README (@jsayles)

This commit is contained in:
Florent Lebreton
2014-11-26 19:20:45 +01:00
parent 337a8f9a08
commit 11ae827643

View File

@@ -50,6 +50,20 @@ USAGE
class SignatureForm(forms.Form): class SignatureForm(forms.Form):
signature = JSignatureField() signature = JSignatureField()
* In your template
::
{{ form.media }}
<form action="." method="POST">
{% for field in form %}
{{ field.label_tag }}
{{ field }}
{% endfor %}
<input type="submit" value="Save"/>
{% csrf_token %}
</form>
* Render image after form validation: * Render image after form validation:
:: ::