A handwriting widget for django
Project description
Django Handwriting Widget
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
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
File details
Details for the file django-handwriting-widget-0.1.6.tar.gz
.
File metadata
- Download URL: django-handwriting-widget-0.1.6.tar.gz
- Upload date:
- Size: 192.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d97096dcfe294aa315659395313e906da4cc019d19dc764f8aee2a8c6d02d00 |
|
MD5 | 50a8b5ef95b62bd6ac8beecc3b0868fc |
|
BLAKE2b-256 | fe74eaee1d671e95b7fd4e2410afc2cda82f25ae3c47b6b7d5861a49801e9fd4 |
File details
Details for the file django_handwriting_widget-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: django_handwriting_widget-0.1.6-py3-none-any.whl
- Upload date:
- Size: 193.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8170f7683d9d386b5753b68e67677c2cbcc151587ed07badff3a195baf636c38 |
|
MD5 | 3711b96919dbe58068fc1fa1c979183a |
|
BLAKE2b-256 | b83526aca86479bd14a5536c3c23df038f2ecc1443d8d7b4ef8257ac5fa16e03 |