I’m learning Django, and I come from a rails background. As such, I’m asking a bunch of questions trying to find some grounding in django.
When you call a partial in rails, you have the option to include some local variables as part of the call:
render 'folder_name/partial_name', :local_variable_name => 6 #or @variable or "a string" etc.."
then in the partial, the variable “local_variable_name” is available:
<h1><%= local_variable_name %></h1>
Is there some equivalent in the django include? eg, any way to change this to accomplish this task:
{% include 'folder_name/partial_name.html' %}
As per the Django documentation:
Enjoy!