I am getting this error while I click on comment button which i mention in line 51 in html file.

43 views
Skip to first unread message

Yash Lanjewar

unread,
Sep 12, 2020, 4:34:10 AM9/12/20
to django...@googlegroups.com
1..PNG
2.PNG
3.PNG
4.PNG

coolguy

unread,
Sep 12, 2020, 12:29:16 PM9/12/20
to Django users
Can't see the line number in your provided screens.
However, i can see you have additional id id={{ i.id }}added to your button line. (remove it)
You have already provided the id in href="{% url 'userpage:post_detail' i.id %}" attribute.

Yash Lanjewar

unread,
Sep 14, 2020, 3:09:04 PM9/14/20
to Django users
still i am getting error.8.PNG10.PNG13.PNG12.PNG

coolguy

unread,
Sep 14, 2020, 4:16:43 PM9/14/20
to Django users
This is not the same error...

What is this 'Post' in your >>> post=Post.objects.filter(Post, pk=ID)
based on the django error you are using model here which is not how filter works...

this should be a field name like xxx.filter(field_name__id=ID)

I would suggest you to refer to documentation on filter to familiarize yourself.


Yash Lanjewar

unread,
Sep 14, 2020, 10:13:20 PM9/14/20
to django...@googlegroups.com
Post is my model which I created already. 

Sent from my Huawei phone
--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/cukEVWOSX2A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d6eb7545-8312-419a-ac5a-07edaaee6fb8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages