Add a template example in README (@jsayles)
This commit is contained in:
14
README.rst
14
README.rst
@@ -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:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|||||||
Reference in New Issue
Block a user