In PHP I'm used to being able to do print $var
or print_r($var)
.
I can print variables in my views in python but they end up in my cmd window not on the page itself. This is fine for some things but windows' cmd window isn't exactly the most readable when it starts wrapping output and turning it into gibberish.
I tried doing {% print somevar %}
in the django template, but I get TemplateSyntaxError: Invalid block tag: 'print'
So, for someone who's new to Python how do I easily see the value of a variable?