Assign variables to child template in {% include %} tag Django

Like @Besnik suggested, it’s pretty simple:

{% include "subject_file_upload.html" with form=form foo=bar %}

The documentation for include mentions this. It also mentions that you can use only to render the template with the given variables only, without inheriting any other variables.

Thank you @Besnik

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)