3 ms·
One thing: use the "with" keyword so that you don't have to do td.close(), etc every time. It's cleaner and reduces bugs. Also, I agree. I'm using templates
by ljlolel 18y ago
One thing: use the "with" keyword so that you don't have to do td.close(), etc every time. It's cleaner and reduces bugs.
Also, I agree. I'm using templates that are just python functions in my new Python web framework, Webify (http://github.com/jperla/webify/tree/master http://github.com/jperla/webify/tree/master).
I honestly don't think I've made it clean enough though (there are a lot of yield's there). Nevertheless, I think I'm on the right track.
The only thing I'm not sure about is that the Django people seem to think that allowing designers to edit code the html directly should be allowed, and that they need a simple secure straightforward html template language. Pure Python obviously avoids that. I also kind of like the straightjacket of Python templates.
- joshu 18y agoI'll look at "with" -- I'm still finding my legs on python.