Warning
This documentation does not refer to the most recent version of Pylons. Current Documentation
The commands module is accessible via the pylons module.
The command(s) listed here are for use with Paste to enable easy creation of various core Pylons templates.
Currently available commands are:
controller, shell
Create a Controller and functional test for it
The Controller command will create the standard controller template file and associated functional test to speed creation of controllers.
Example usage:
yourproj% paster controller comments Creating yourproj/yourproj/controllers/comments.py Creating yourproj/yourproj/tests/functional/test_comments.py
If you'd like to have controllers underneath a directory, just include the path as the controller name and the necessary directories will be created for you:
yourproj% paster controller admin/trackback Creating yourproj/controllers/admin Creating yourproj/yourproj/controllers/admin/trackback.py Creating yourproj/yourproj/tests/functional/test_admin_trackback.py
This class contains 17 members.
Open an interactive shell with the Pylons app loaded
The optional CONFIG_FILE argument specifies the config file to use for the interactive shell. CONFIG_FILE defaults to 'development.ini'.
This allows you to test your mapper, models, and simulate web requests using paste.fixture.
Example:
$ paster shell my-development.ini
This class contains 17 members.
See the source for more information.