-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Example :
In view:
context = {
'bills' : bill.objects.all()
}models:
class Bill(models.Model):
signature_name = models.CharField(max_length=255, blank=True)
signature = JSignatureField(blank =True)template :
{{ bills.media }}
{% for bill in bills %}
<p>{{bill.billNumber}}</p>
<img src="{{ bill.signature | signature_base64 }}" alt="">
{% endfor %}Django Debug output
<html>
<body>
<!--StartFragment--><h1 style="padding: 0px; margin: 0px; font-weight: normal; color: rgb(0, 0, 0); font-family: sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">JSONDecodeError at /test/</h1><pre class="exception_value" style="padding: 0px; margin: 10px 0px; font-size: 1.5rem; white-space: pre-wrap; word-break: break-word; font-family: sans-serif; color: rgb(87, 87, 87); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Extra data: line 1 column 961 (char 960)</pre>
Request Method: | GET
-- | --
http://127.0.0.1:8000/test/
5.1.5
JSONDecodeError
Extra data: line 1 column 961 (char 960)
C:\Users\snc_p\AppData\Local\Programs\Python\Python313\Lib\json\decoder.py, line 348, in decode
workingBill.views.testView
C:\Projet\git\BonDeTravail\.venv\Scripts\python.exe
3.13.1
['C:\\Projet\\git\\BonDeTravail', 'C:\\Users\\snc_p\\AppData\\Local\\Programs\\Python\\Python313\\python313.zip', 'C:\\Users\\snc_p\\AppData\\Local\\Programs\\Python\\Python313\\DLLs', 'C:\\Users\\snc_p\\AppData\\Local\\Programs\\Python\\Python313\\Lib', 'C:\\Users\\snc_p\\AppData\\Local\\Programs\\Python\\Python313', 'C:\\Projet\\git\\BonDeTravail\\.venv', 'C:\\Projet\\git\\BonDeTravail\\.venv\\Lib\\site-packages']
Fri, 31 Jan 2025 14:56:55 -0500
<!--EndFragment-->
</body>
</html>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels