Latest Version: 0.9.6.2

ControllerCommand

Create a Controller and accompanying functional test

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

Attributes

a description

None

a group_name

'pylons'

a hidden

False

a max_args

1

a max_args_error

'You must provide no more than %(max_args)s arguments'

a min_args

1

a min_args_error

'You must provide at least %(min_args)s arguments'

a parser

<paste.script.bool_optparse.BoolOptionParser instance at 0x2508468>

a summary

'Create a Controller and accompanying functional test'

a usage

"\nCreate a Controller and accompanying functional test\n\n    The Controller command will create the standard controller template\n    file and associated functional test to speed creation of controllers.\n\n    Example usage::\n\n        yourproj% paster controller comments\n        Creating yourproj/yourproj/controllers/comments.py\n        Creating yourproj/yourproj/tests/functional/test_comments.py\n\n    If you'd like to have controllers underneath a directory, just include\n    the path as the controller name and the necessary directories will be\n    created for you::\n\n        yourproj% paster controller admin/trackback\n        Creating yourproj/controllers/admin\n        Creating yourproj/yourproj/controllers/admin/trackback.py\n        Creating yourproj/yourproj/tests/functional/test_admin_trackback.py\n    "

Methods

f __init__(self, name) ...

f command(self) ...

Main command to create controller

See the source for more information.

Top