Вопрос

What's the correct way to extend django's class based views to display a page with a series of list objects.

Does it make sense to create a ListView class for one of the objects and then pass the data for the other object lists in the get_context function?

What's the 'right' way to do this?

Это было полезно?

Решение

I'd just write a custom class view that inherits from the TemplateView and put your logic in the get_context_data method.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top