document

Decorators to enhance the docstrings of classes

camelot.core.document.documented_entity()[source]

Class decorator to append an image of the default view for an entity to an entity class. The image can be generated by using the testing framework to create images of all default views in an application

@documented_entity()
class Movie(Entity):
  '''A movie as played in the theater'''
  title = Field(Unicode(50))

The resulting docstring of the Movie entity will be

'''A movie as played in the theater

image ../_static/entityviews/new_view_movie.png
'''

Previous topic

dbprofiles

Next topic

exception

This Page