added meta support for indexes ensured at call-time

This commit is contained in:
blackbrrr
2010-01-06 04:28:24 +08:00
committed by Harry Marr
parent 2e74c93878
commit a6d64b2010
2 changed files with 21 additions and 3 deletions

View File

@@ -154,8 +154,12 @@ class TopLevelDocumentMetaclass(DocumentMetaclass):
'allow_inheritance': True,
'max_documents': None,
'max_size': None,
'indexes': [] # indexes to be ensured at runtime
}
# Apply document-defined meta options
meta.update(attrs.get('meta', {}))
# Only simple classes - direct subclasses of Document - may set
# allow_inheritance to False
if not simple_class and not meta['allow_inheritance']: