Hi Motaz,
I tried it again now but when I press it there is no change. The likes
count is the same and the like button doesnt change to dislike
On Sunday, May 17, 2020 at 10:05:12 PM UTC-4, Motaz Hejaze wrote:
>
> The button is submitted but without page refresh
>
> On Mon, 18 May 2020, 3:53 am
Why don’t you use fetch api? Its simple. Once you get the response from the server, you can use InsertAdjacentHtml. Sent from Mail for Windows 10 From: Motaz HejazeSent: 18 May 2020 07:34To: Django usersSubject: Re: how to write Ajax for a Like button in Django The button is submitted but without
The button is submitted but without page refresh
On Mon, 18 May 2020, 3:53 am Ahmed Khairy,
wrote:
> Hi Motaz,
>
> When I added your code it disabled the function of the button nothing
> happened
>
> On Sunday, May 17, 2020 at 9:30:38 PM UTC-4, Motaz Hejaze wrote:
>>
>> In your like button form
Hi Motaz,
When I added your code it disabled the function of the button nothing
happened
On Sunday, May 17, 2020 at 9:30:38 PM UTC-4, Motaz Hejaze wrote:
>
> In your like button form in your templates ,
> try this :
>
>
>
> i don't think you need ajax for this , but if you still need it let
In your like button form in your templates ,
try this :
i don't think you need ajax for this , but if you still need it let us know
On Mon, 18 May 2020, 2:26 am Gabriel Araya Garcia, <
gabrielaraya2...@gmail.com> wrote:
> Hi Ahmed, I was looking for that during several months and I have
Hi Ahmed, I was looking for that during several months and I have found
examples than not run, and therefore I`ve get one conclution: "It`s not
posible to get that functionality in Django". No one could demostrate with
example code.
If you find something, please send me the code.
Thanks
Gabriel
Hi all,
I need some help writing the ajax for a like button instead of refreshing
every time a like is posted
here is the template:
{% csrf_token %}
{% if user.is_authenticated %}
{% if liked
7 matches
Mail list logo