2011-11-13, 13:14
gugahoi Wrote:Awesome, it's exactly as I thought it was. I only overlooked the hook.
One thing I noticed tho is that all the py files end up having a pyc file except for the module I created. It does show up in the page fine however.
Another quick question I have: how do you debug some of the code? As in, variables for example. How do you check the content of a variable? Can I just print it to the console or would I have to pass it to the template and use some special printing there?
*.pyc files are created by Python, they're just compiled version of the *.py files. They are in .gitignore and can be safely deleted, they'll just get re-made by Python.
For simple debugging you can just use
Code:
print variablename
in the Python code to print it to the console.