On button click need to call a python function...

93 views
Skip to first unread message

Saswat Mahapatra

unread,
Oct 18, 2022, 2:05:50 AM10/18/22
to Django users
Hi ,

I am new to django. 
On button click I need to call a python function which returns 2 values. If both the values are the same then I need to display the same image in 2 places on the web page or else a different image.

How to call the python function from html ? 

Thanks & Regards,
Saswat

Jitendra kumar Patra

unread,
Oct 18, 2022, 2:11:39 AM10/18/22
to django...@googlegroups.com
Ping me

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/294c7d09-d558-4b18-97c6-ee369c27a591n%40googlegroups.com.

Saswat Mahapatra

unread,
Oct 18, 2022, 2:18:11 AM10/18/22
to Django users
Hi  jitendra,

Thank you for your quick response.  I am new to python  web development. On button click I need to call a python function and based on 2 values which It will return I need to show a image.

Thank you,
Saswat

Mike Dewhirst

unread,
Oct 18, 2022, 4:20:19 AM10/18/22
to django...@googlegroups.com, Saswat Mahapatra
I would be looking at htmx.org

Maybe django-htmx

I haven't tried it but I intend to one of these days.

N





Thanks & Regards,
Saswat
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/294c7d09-d558-4b18-97c6-ee369c27a591n%40googlegroups.com.


-- 
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.
OpenPGP_signature

subin

unread,
Oct 18, 2022, 1:10:09 PM10/18/22
to django...@googlegroups.com

subin

unread,
Oct 18, 2022, 1:11:17 PM10/18/22
to django...@googlegroups.com
Please let me know if you need an extension.

subin

unread,
Oct 18, 2022, 1:12:49 PM10/18/22
to django...@googlegroups.com

subin

unread,
Oct 18, 2022, 1:13:26 PM10/18/22
to django...@googlegroups.com
Please let me know if you need to reschedule.

--
Reply all
Reply to author
Forward
0 new messages