Table Of Contents

Previous topic

tgext.geo: Geographic Extensions for TurboGears

Next topic

tgext.geo FeatureServer Tutorial

tgext.geo.commands – tgext.geo Commands

Module Contents

class tgext.geo.commands.TGGeoControllerCommand(name)

Create a geo controller and accompanying functional test

The TGGeoController command will create the standard controller template file and associated functional test.

Example usage:

yourproj% paster geo-controller foos
Creating yourproj/yourproj/controllers/foos.py
Creating yourproj/yourproj/tests/functional/test_foos.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 geo-controller admin/foos
Creating yourproj/controllers/admin
Creating yourproj/yourproj/controllers/admin/foos.py
Creating yourproj/yourproj/tests/functional/test_admin_foos.py
class tgext.geo.commands.TGGeoModelCommand(name)

Create a geo model

The TGGeoModel command will create the standard model template file.

Example usage:

yourproj% paster geo-model foos
Creating yourproj/yourproj/model/foos.py

If you’d like to have models underneath a directory, just include the path as the model name and the necessary directories will be created for you:

yourproj% paster geo-model admin/foos
Creating yourproj/model/admin
Creating yourproj/yourproj/model/admin/foos.py
class tgext.geo.commands.TGGeoLayerCommand(name)

Create a geo layer (controller + model).

The TGGeoLayer command will create the standard controller and model template files. It combines the TGGeoController and TGGeoModel commands.

Example usage:

yourproj% paster geo-layer foos
Creating yourproj/yourproj/controllers/foos.py
Creating yourproj/yourproj/tests/functional/test_foos.py
Creating yourproj/yourproj/model/foos.py

If you’d like to have controllers and models underneath a directory, just include the path as the controller name and the necessary directories will be created for you:

yourproj% paster geo-layer admin/foos
Creating yourproj/controllers/admin
Creating yourproj/yourproj/controllers/admin/foos.py
Creating yourproj/yourproj/tests/functional/test_admin_foos.py
Creating yourproj/model/admin
Creating yourproj/yourproj/model/admin/foos.py
class tgext.geo.commands.TGGeoTileCacheCommand(name)

Create a tilecache controller and accompanying functional test

The TGGeoTileCache command will create the tilecache controller template file and associated functional test.

Example usage:

yourproj% paster geo-tilecache tiles
Creating yourproj/yourproj/controllers/tiles.py
Creating yourproj/yourproj/tests/functional/test_tiles.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 geo-controller admin/tiles
Creating yourproj/controllers/admin
Creating yourproj/yourproj/controllers/admin/tiles.py
Creating yourproj/yourproj/tests/functional/test_admin_tiles.py