From ddf145a22aa006854f4b7a8c3476fd590c7991ae Mon Sep 17 00:00:00 2001 From: Daniel W Bond Date: Tue, 3 Mar 2020 16:52:52 -0500 Subject: [PATCH] to back up slightly, listviews do not automatically pluralize the model assigned --- bookshare/trades/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bookshare/trades/views.py b/bookshare/trades/views.py index 8bc59f3..2a4fbc1 100644 --- a/bookshare/trades/views.py +++ b/bookshare/trades/views.py @@ -28,6 +28,7 @@ from core.models import Student class ListListings(LoginRequiredMixin, ListView): model = Listing + context_object_name = 'listings' paginate_by = 16 queryset = Listing.objects.exclude(cancelled=True).order_by('-created') template_name = 'list_listings.html' -- GitLab