DataBase Fields¶
Fluo defines some generic fields
StatusField¶
A CharField, with default settings:
choices– a tuple with ‘active’, ‘inactive’max_length– set to 10 charactersdefault– ‘active’verbose_name– ‘status’help_text– ‘Is active?’
DataBase Models¶
Fluo defines some abstract models
OrderedModel¶
OrderedModel has these field:
- ordering – Optional.
and these methods:
brothers_and_me()– Returns all siblings and the objects itselfbrothers()– Returns all siblings without selfis_first()– Returns if the object is the first oneis_last()– Returns if the object is the last oneup()– Move up the object, and push down all othersdown()– Move down the object, and push up all others
TreeOrderedModel¶
TreeOrderedModel derives from OrderedModel, and it has these field:
- parent – Optional. The parent node. A
ForeignKeytoTreeOrderedModel