django-jsignature
django-jsignature copied to clipboard
form.media is empty
Hello,
form.media does not load anything when using a ModelForm
class TransactionCreateForm(forms.ModelForm):
signature = JSignatureField()
class Meta:
model = models.Transaction
fields = [ ..., 'signature']
The entire field is empty, only showing the reset button. Inspection of source shows that the template does not render anything under {{ form.media }}
Fixed it by manually adding the files to the page template but would be nice to know why it didn't work
<script src="{% static 'js/jSignature.min.js' %}"></script>
<script src="{% static 'js/django_jsignature.js' %}"></script>
Added test and could not reproduce