A handwriting widget for django
Project description
Django Handwriting Widget
A handwriting widget for django
Using signature_pad for js library
Installation
Install with pip
pip install django-handwriting-widget
Add this app to INSTALLED_APPS
in settings.py
INSTALLED_APPS = [
...
'email_notifications',
]
Usage
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-handwriting-widget-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cc97de183e79e762b8d95aafb8d36339ffbaa9a2b94ac6504456159f85dcc90 |
|
MD5 | f0bc56ec62fa05b4d5fdf7fb2b7e3169 |
|
BLAKE2b-256 | 20834a1a71943e9ae07a0fa48a4a50c39418cac6ab721f15cf0134899f480d43 |
Close
Hashes for django_handwriting_widget-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d35012edb1fadcee4cc3d1068d6bd3154a4a9c041097fe43af010933fc9ac47 |
|
MD5 | a5a703f13b1f56c84064df0b1d9273db |
|
BLAKE2b-256 | 7641bb0c7d32d804d808d5c2645d40cb36d4af3be01ef8b3759bded46843308d |