Fixes tiny documentation error. Adds possibility to add custom validation methods to fields, e. g.:
class Customer(Document):
country = StringField(validation=lambda value: value in ['DE', 'AT', 'CH'])
Replaced some str() with unicode() for i18n reasons.
This commit is contained in:
parent
0a074e52e0
commit
48facec524
4 changed files with 43 additions and 17 deletions
|
|
@ -22,7 +22,7 @@ objects** as class attributes to the document class::
|
|||
|
||||
class Page(Document):
|
||||
title = StringField(max_length=200, required=True)
|
||||
date_modified = DateTimeField(default=datetime.now)
|
||||
date_modified = DateTimeField(default=datetime.datetime.now)
|
||||
|
||||
Fields
|
||||
======
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue