Giter VIP home page Giter VIP logo

django-anysign's Introduction

Build Status Documentation Status Pypi Status

django-anysign

django-anysign is a Django application to manage online signature in a generic way.

Its goal is to provide a consistent API whatever the signature implementation, so that you can either:

  • switch from one signature backend to another;
  • use several backends at once.

See Alternatives & related projects for details about supported online signature services.

Project status

django-anysign is under active development. The project is not mature yet, but authors already use it! It means that, while API and implementation may change (improve!), authors do care of the changes.

Also, help is welcome! Feel free to report issues, request features or refactoring!

Resources

django-anysign's People

Contributors

benoitbryon avatar brunobord avatar eliotberriot avatar hsmett avatar joehybird avatar morganead avatar sbillion avatar smcoll avatar zebuline avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-anysign's Issues

django_anysign provides generic SignerReturnView

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 request
  • signature and get_signature => property to get signature instance from request
  • get_context_data() => signer in context data, signer.signature in context data
  • update_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.
  • template: signature/signer_return.html

makemigrations creates unneeded migrations

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.

management command for creating SignatureType instances

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.

Signer model has signature_backend_id attribute

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).

Django 4.x support

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?

Signature model has signature_id attribute

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:

  • it is quick and easy to get the signature object matching the request. We can use a SingleObjectMixin whatever the backend.
  • it is a bit harder for clients to "guess" a valid URL and try various POST/GET requests. They need a valid signature identifier.

UUID should be the default implementation, but of course this must be overridable.

Drop support of Django<1.8

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).

Deprecation warnings

/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

django_anysign provides generic SignatureCallbackView

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 request
  • get_context_data() => signer in context data, signer.signature in context data
  • update_signature(status, status_date) => updates signature status (backend's specific status). Not implemented.
  • template: 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:

  • using DocuSign, callbacks can be sent when document is added. No signer involved
  • using DocuSign, when signature is created with "embedded signing", all signers are marked as "sent", i.e. multiple signers involved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.