D
D
DennyD3142017-07-05 03:08:12
Django
DennyD314, 2017-07-05 03:08:12

How to make output from two views into one template?

Hello!
There are 2 different views, one is a DetailView of the news, the other is a ListView of the forum section associated with the news . The news and the section are connected one to one. It is necessary to make it so that the content of the associated forum section is displayed under the news. Tell me where to start, in which direction to dig. I would not want to completely rewrite the view for displaying news, repeating the already written code in the view for the section. I am sure that there are more concise and correct options.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-07-05
@DennyD314

Do not draw a conclusion from two
views in any way Make one view and use mixins in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question