Hi all, django n00b here!
i was exoerimenting with django and various IDEs to see what best suits me.
so i was trying the following simple example:
inside views i defined a function for say home_page where i returned an html rendered template providing context like so:
def home_page(request):
context = {'variable1': 1}
return render(request, 'homepage.html', context=context)
then inside the html page i tried something simple like this
<h1>Hello!</h1>
{% if variable1 == 1 %}
var = 1
{% else %}
var != 1
{% endif %}
i understand that after using variable1 for the first time inside the template the ide will propose it every time i type var… but the first time will not know about it?
is there a way to make the template know that variable1 is actually available? is this doable at all? is it a matter of ide? plugin? configuration?
thx for any replies!