diff --git a/README.rst b/README.rst index e6af966..69ddf7e 100644 --- a/README.rst +++ b/README.rst @@ -6,22 +6,27 @@ It provides: * A model field to store a captured signature; * A mixin adding two fields (signature / signature_date) in any of your Django models. -.. image:: https://travis-ci.org/fle/django-jsignature.png?branch=master :target: https://travis-ci.org/fle/django-jsignature +.. image:: https://travis-ci.org/fle/django-jsignature.png?branch=master + :target: https://travis-ci.org/fle/django-jsignature ================== INSTALL ================== + For now: :: + pip install https://github.com/fle/django-solo/archive/master.zip ================== USAGE ================== + * Add ``jsignature`` to your ``INSTALLED_APPS``: :: + # settings.py INSTALLED_APPS = ( ... @@ -31,6 +36,7 @@ USAGE * Use provided form field and widget: :: + # forms.py from django import forms from jsignature.forms import JSignatureField @@ -41,6 +47,7 @@ USAGE * Render image after form validation: :: + # views.py from jsignature.utils import draw_signature from myapp.forms import SignatureForm @@ -58,10 +65,13 @@ USAGE ================== CUSTOMIZATION ================== + JSignature plugin options are available in python: + * Globally, in your settings: :: + # settings.py JSIGNATURE_WIDTH = 500 JSIGNATURE_HEIGHT = 200 @@ -69,6 +79,7 @@ JSignature plugin options are available in python: * Specifically, in your form: :: + # forms.py from jsignature.forms import JSignatureField from jsignature.widgets import JSignatureWidget @@ -78,9 +89,11 @@ JSignature plugin options are available in python: ================== IN YOUR MODELS ================== + If you wan to store signatures, provided mixin gives a `signature` and a `signature_date` that update themselves: :: + from django.db import models from jsignature.mixins import JSignatureFieldsMixin