1👍
I think that this is because you get the error because you use the shortcut function get_object_or_404 with Post model.
So the urls patterns work ok. Try to locate where you use this function and add some printing or break with pdb.
👤eran
Source:stackexchange.com