Hi Mayur,

I'm not sure what you mean by "there is no javascript in django" because I
use it all the time. JS is not tied to Django in any way since its
operations are usually client-side and so it can be used inside your Django
templates.

In any case, you can have JS code in your template inside <script> tags,
where you can asynchronously send a request to your relevant view
using the Fetch
API <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch>,
then process the data and display it on your template.

Hope this helps!

Best,
Ahmed

On Mon, Apr 29, 2019 at 1:03 PM Mayur Bagul <mayur.bag...@gmail.com> wrote:

> Hello Community,
>
> Im looking for solution on Button Event.
> I have situation like mention below :
>
> i have one button check temperature. after clicking on it; it should
> display dummy temperature on template from view.py i wrote.
> but im not getting how i can do this because there is no javascript used
> in django.
>
> Please guide me to get rid of this impedance.
>
> Thanking you,
> Mayur Bagul.
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3a9d8006-ab98-44e4-a2ce-66e4a439cd9d%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3a9d8006-ab98-44e4-a2ce-66e4a439cd9d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKizqR5AkgSGxc%2BPtNrGnwsh6938T0SfCBKyW%2BMt6289YmFuXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to