Skip to content
Advertisement

When i hit the “PUBLISH COMMENT BUTTON” the comments does not get posted in my frontend in django

i am making a comment section in django but when i hit the comment section the comment does get published to the comment section of my website it just refreshed the page and does nothing but when i add a comment from my backend which is the admin section it works perfectly fine and get updated in my front end but the comment form in my blog posts details doesnt work, let me show some of my code

views.py

JavaScript

forms.py

JavaScript

admin.py

JavaScript

models.py

JavaScript

blogdetail.html this template render the comments forms too

JavaScript

i have tried a lot of ways to fix this but it end up not working and note i do not get any error but it just refreshes the page and then no comments shows up.

any help would be greatly appreciated

Advertisement

Answer

template

JavaScript

views.py

JavaScript
Advertisement