1👍
You’ve defined it as a method rather than a class
def facilities_list(ListView):
should be
class facilities_list(ListView):
0👍
ListView is imported in Django Class based Views, and it can be done in given way:
class FacilitiesListView(ListView):
model = Facilities
queryset = Facilities.objects.all()
Use Django Class Based Views for imported any of Django Genenic class based Views.
Also define a template name or use default template name for it which is facilities_list.html in you facilities template folder.
- CBV overrides django-filter context
- Django strange behavior in include
- Django: same method different url
- Mod_wsgi apache2 loading failure
- Django Ajax 403 only when Posting from custom localhost url
Source:stackexchange.com