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.

https://docs.djangoproject.com/en/3.1/topics/db/aggregation/

https://docs.djangoproject.com/en/3.1/topics/db/aggregation/#filter-and-exclude




On Monday, September 14, 2020 at 3:09:04 PM UTC-4 yashlan...@gmail.com 
wrote:

> still i am getting error.[image: 8.PNG][image: 10.PNG][image: 13.PNG][image: 
> 12.PNG]
>
> On Saturday, September 12, 2020 at 9:59:16 PM UTC+5:30 coolguy wrote:
>
>> 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.
>>
>> On Saturday, September 12, 2020 at 4:34:10 AM UTC-4 yashlan...@gmail.com 
>> wrote:
>>
>>> [image: 1..PNG]
>>> [image: 2.PNG]
>>> [image: 3.PNG]
>>> [image: 4.PNG]
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d6eb7545-8312-419a-ac5a-07edaaee6fb8n%40googlegroups.com.

Reply via email to