1

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?

4

1 回答 1

3

我只需编写一个继承自TemplateView的自定义类视图,并将您的逻辑放在 get_context_data 方法中。

于 2011-11-06T23:37:40.260 回答