Skip to main content

A handwriting widget for django

Project description

Django Handwriting Widget

CircleCI

A handwriting widget for django

Installation

Install with pip

pip install django-handwriting-widget

Add this app to INSTALLED_APPS in settings.py

INSTALLED_APPS = [
    ...
    'handwriting',
]

Usage

Example model

Form

from django import forms

from handwriting.forms import HandwritingPad

from .models import Signature


class SignatureForm(forms.ModelForm):
    class Meta:
        model = Signature
        fields = '__all__'
        widgets = {
            'image': HandwritingPad(),
        }

Admin

from django.contrib import admin

from handwriting.admin import HandwritingPadModelAdmin

from .models import Signature


@admin.register(Signature)
class SignatureAdmin(HandwritingPadModelAdmin):
    list_display = ('name', 'create_at')

or

from django.contrib import admin

from handwriting.admin import HandwritingPadAdminMixin

from .models import Signature


@admin.register(Signature)
class SignatureAdmin(HandwritingPadAdminMixin, admin.ModelAdmin):
    list_display = ('name', 'create_at')

or

from django.contrib import admin

from .forms import SignatureForm
from .models import Signature


@admin.register(Signature)
class SignatureAdmin(admin.ModelAdmin):
    form = SignatureForm
    list_display = ('name', 'create_at')

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-handwriting-widget-0.1.3.tar.gz (192.5 kB view hashes)

Uploaded Source

Built Distribution

django_handwriting_widget-0.1.3-py3-none-any.whl (193.6 kB view hashes)

Uploaded Python 3

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