Hi Aakash,

Aakash Baranwal – Tue, 16. April 2019 13:12
> Hi Kasper,
> Thanks a lot for your help. I did as you suggested.
> This is the code now:
> def video_detail_view(request, pk=None): # pk == idobj =
> get_object_or_404(Video, pk=pk)print(obj)context = {"object": obj}return
> render(request, "deploy/detail_view.html", context)
> But still it is showing the error. Now the error is: Page Not Found
> Now what should I do?

First of all, please keep this thread on the mailing list instead of writing 
just to me.

The reason you're getting a "Page not found" error should be pretty obvious. 
It's because you don't have an object with that primary key (pk, probably 
"None"?) in your Video model.

This is all pretty basic django stuff, so I suggest you revisit the excellent 
Django documentation and read up on how the Django model/view stuff works.

Kind regards,

Kasper Laudrup

-- 
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/20190416111910.Horde.TEd9eA83AgCxC1KME4bktdt%40cloud.stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to