Skip to main content

Present users with your Terms of Service and other documents, and record their consent

Project description

https://badge.fury.io/py/django-signoff.svg https://travis-ci.org/dcollinsn/django-signoff.svg?branch=master https://codecov.io/gh/dcollinsn/django-signoff/branch/master/graph/badge.svg

Present users with your Terms of Service and other documents, and record their consent

Documentation

The full documentation is at https://django-signoff.readthedocs.io.

Quickstart

Install django-signoff:

pip install django-signoff

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'signoff.apps.SignoffConfig',
    ...
)

Add django-signoff’s URL patterns:

urlpatterns = [
    ...
    url(r'^signoff/', include('signoff.urls')),
    ...
]

If you want users to be automatically prompted to sign any documents that you add before they can use your site, add django-signoff’s middleware:

MIDDLEWARE = (
   ...
   'signoff.middleware.ConsentMiddleware',
   ...
)

You can add some settings to your settings.py file to configure django-signoff:

# Send a notification to the user by email (using django-mailer) when they
# sign a document, including the text of the document. Default is False.
SIGNOFF_EMAIL_USER = True

# Send a notification to a defined list of addresses whenever any user
# signs a document (may be useful for recordkeeping). Default is none.
SIGNOFF_EMAIL_RECEIPT = ['legal@example.com', ]

# We don't delete signatures from your database, for compliance reasons.
# However, we do require new signatures whenever a new version of a
# document is created by creating a new object and setting the
# `prev_version` field. You can also require new signatures whenever a
# document is edited in the admin (we check the `updated` field of
# the document, and only accept newer signatures):
SIGNOFF_CHECK_DOCUMENT_UPDATED = True

# You can also require new signatures whenever a user's display name
# changes (we require users to enter their display name when signing
# a document):
SIGNOFF_CHECK_FULL_NAME = True

# If you're using the middleware, it will redirect any logged-in requests
# from users who owe signatures to the 'legal' index by default, except
# for requests within the 'signoff' app (to avoid redirect loops), and
# requests to the 'auth_logout' url name (to allow users to log out
# of the site). If you want to add additional URLs that can be accessed
# by users who have not signed your documents yet, you can do something
# like the following:
SIGNOFF_ADDITIONAL_ALLOWED_APPS = ('djdt', )
SIGNOFF_ADDITIONAL_ALLOWED_URLS = ('auth_logout', )
# (The latter is only an example, 'auth_logout' is automatically allowed.)

Features

  • TODO

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.1 (2018-06-04)

  • The app is now usable as a very limited alpha * Email options advertised in readme are not implemented * Templates could use some work

  • Add default templates

  • Add configuration options

0.1.0 (2018-06-03)

  • Initial release, demonstration of models and core logic

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-signoff-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

django_signoff-0.1.1-py2.py3-none-any.whl (18.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-signoff-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-signoff-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eb7cd6ed09b4e366ee1cb1e0618c0b7d7a61a8057db015cd2452f8873bd096ec
MD5 489f589fb53741bfa971a9aaf514147e
BLAKE2b-256 fa591c5af6be21f7d17930be1ffbd3d353afd24aa11a5f7432e367af72e36533

See more details on using hashes here.

File details

Details for the file django_signoff-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_signoff-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c5652ac06d2f7dd359deb0d28493028e952e2bbeda0779ddb46189bcb3fef165
MD5 564f332786baab76d4a3aedc73a5e4c0
BLAKE2b-256 81ac357d6fc4c7781f85edcffe243141874b7d35f0a004fd061698c41c74a588

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page