I am a Django newbie so my question might appear basic to advanced users.
I have two classed based views, one for list and the other for detail. List is functioning fine but the detail one is not. When I give the post number, nothing happens. I am pretty certain, I am not giving the URL correctly. Please help me out. My code is below.
Code in app views file
class FeedDetailView(DetailView):
template_name = "feeds/detail_view.html"
queryset = Feed.objects.all()
def get_object(self):
pk = self.kwargs.get("pk")
return Feed.objects.get(id=pk)
Code in app urls file for both list and view urls
url('<int:pk>', FeedDetailView.as_view(), name ='detail'),
url('', FeedListView.as_view(), name ='list'),
Code in main project url file
path('feeds/', include('feeds.urls')),
When in the browser I type http://127.0.0.1:8000/feeds/(post number), nothing happens.