问题
Say I wanted to add some imports to the file generated when I run:
paster controller controllern_name
Is this possible?
回答1:
I assume you want to modify the pylons templates -- in this case controller.py_tmpl
. It's best to create your own set of templates based on the ones from pylons, and then use them when starting a new project.
来源:https://stackoverflow.com/questions/3699796/how-to-create-modify-the-controller-class-generated-by-pylons