I have a very basic template (basic_template.html), and want to fill in the with data formatted using another partial template. The basic_template.html might contain several things formatted using the partial template.
How should I structure the code in views.py?
The reason I am doing this is that later on the will be filled using Ajax. Am I doing this right?
You can do:
where
subtemplate.htmlis another Django template. In thissubtemplate.htmlyou can put the HTML that would be obtained with Ajax.You can also include the template multiple times: