Passing variables in Django can get quite boring. Lets tackle this simple problem with an even easier solution.
Normally when you want to access variables from a view on a template you pass them through like so:
return render(request, 'something.html', {
'var1' : var1
'var2' : var2 })
Or something similar to that. This works great if you have 2-5 variables, after that it starts getting really old, really quick. So how can we just pass everything we assign to the template for use?
return render(request, 'something.html', locals())
Problem solved in 10 seconds flat. Tada!