peopledoc / django-anysign Goto Github PK
View Code? Open in Web Editor NEWGeneric online signature for Django
License: Other
Generic online signature for Django
License: Other
Make sure django-anysign runs with Django 1.8
The field signature_backend_id
from signer model has not a good name !
Rename it to signer_backend_id
django_anysign.SignatureCallbackView
handles callback requests from backend, usually sent by backend when signature was updated (signed, changed, refused, delivered, ...).
Typical methods/attributes are:
signature
and get_signature
=> property to get signature instance from requestget_context_data()
=> signer
in context data, signer.signature
in context dataupdate_signature(status, status_date)
=> updates signature status (backend's specific status). Not implemented.signature/signature_callback.html
Not sure about signer
property and update_signer
method (see also #9), because the callback may be called on events that do not belong to a signer or belong to multiple signers. As examples:
At the moment, Signature
model has a signature_backend_id
attribute, which contains the signature's identifier in vendor's external database.
Signers can have the same kind of identifiers. In order to make it easier to fetch/identify/inspect signer instances in vendor's external database, let's store this signature_backend_id
for signers too.
This attribute must be optional (blank=True
).
Perhaps it would be advisable to have a unique constraint on SignatureType.signature_backend_code.
Requires recent version of Tox to setup a nice test grid: https://testrun.org/tox/latest/config.html#generating-environments-conditional-settings
At the moment, Signer instances are unordered. But in a typical signature workflow, signers are ordered => add some signing_order
field.
Django ships with a UUIDField, since 1.8. Perhaps the base model classes can use it when Django 1.8 or higher is installed.
What about following Django's supported versions? See https://www.djangoproject.com/download/
Django supports 1.7, 1.8 and 1.4 branches. 1.4 is not supported by django-anysign, so only 1.7 and 1.8 remain.
=> Drop support for django 1.5 and django 1.6 in the next release.
It should make it easier to maintain the application and demo project.
Those who want support of legacy Django version will still be able to install legacy versions of django-anysign (versions are not deleted on PyPI).
django_anysign.SignerReturnView
is a view where signer lands back from backend page, right after he proceed/refused a signature.
Typical methods/attributes are:
signer
and get_signer
=> property to get signer instance from requestsignature
and get_signature
=> property to get signature instance from requestget_context_data()
=> signer
in context data, signer.signature
in context dataupdate_signer(status, status_date)
=> updates signer status (backend's specific status). Not implemented.update_signature(status, status_date)
=> updates signature status (backend's specific status). Not implemented.signature/signer_return.html
For a given signature, signers must be ordered!
The makemigrations
management command will create a new migration for the model inheriting SignatureType
whenever the keys in settings.ANYSIGN['BACKENDS']
change. This can happen if the setting has different values in different environments. makemigrations
will bake the value derived from the first environment into a migration, and then migrate
in the other environment will think the migrations are out of sync with the models.
I forked it, removed django version limit, and adjusted django_anysign_demo for testing.
With Django 4.1.4, it works fine.
May you consider to remove django version dependency?
Just like signature_backend_id
attribute identifies the signature on backend side, we need an identifier on local (Django) side. Because, just as in Django side we store external backend ID, in external backend we may store Django's id. Default primary key (integer id
) is not enough. Something like an uuid would be welcome.
Another use case is URL construction: it is better if "signer return" and "callback" URL contain signature uuid:
UUID should be the default implementation, but of course this must be overridable.
/path/to/django_anysign/backend.py:2: RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls.
from django.core.urlresolvers import reverse
Like #7, but for signer model.
Make sure django-anysign runs with Django 1.7
It would be handy to have a management command which would create a SignatureType for each backend in settings.ANYSIGN['BACKENDS']
. i suppose that presumes that the SignatureType model didn't implement any additional required fields.
django_anysign.CreateSignatureView
deals with signature creation. Typically, it is the view where users put documents and signers together.
docs/settings.txt
, add a section "Check your settings" at the end of the document.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.