Merge pull request #11 from notanumber/master
Updated to fix an error when using jSignature field with Django 2
This commit is contained in:
@@ -13,7 +13,7 @@ from .forms import (
|
|||||||
JSIGNATURE_EMPTY_VALUES)
|
JSIGNATURE_EMPTY_VALUES)
|
||||||
|
|
||||||
|
|
||||||
class JSignatureField(six.with_metaclass(models.SubfieldBase, models.Field)):
|
class JSignatureField(models.Field):
|
||||||
"""
|
"""
|
||||||
A model field handling a signature captured with jSignature
|
A model field handling a signature captured with jSignature
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class JSignatureWidget(HiddenInput):
|
|||||||
return json.dumps(value)
|
return json.dumps(value)
|
||||||
raise ValidationError('Invalid format.')
|
raise ValidationError('Invalid format.')
|
||||||
|
|
||||||
def render(self, name, value, attrs=None):
|
def render(self, name, value, attrs=None, renderer=None):
|
||||||
""" Render widget """
|
""" Render widget """
|
||||||
# Build config
|
# Build config
|
||||||
jsign_id = self.build_jsignature_id(name)
|
jsign_id = self.build_jsignature_id(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user