Is there a way to use mongo engine field type directly inside web2py. I
know in django I can do this:
#-------------------------------------------------------------------------------------------------------------------------------------------
from mongoengine import Document, StringField, DateTimeField
import datetime
class Post(Document):
title = StringField(max_length=200, required=True)
content = StringField(required=True)
date_published = DateTimeField(default=datetime.datetime.now,
required=True)
#------------------------------------------------------------------------------------------------------------------------------------------
MongoEngine field type Django ORM equivalent Web2py DAL equivalent
StringField CharField string URLField URLField IS_URL EmailField
EmailField IS_EMAIL IntField IntegerField integer FloatField FloatField
N/A DecimalField DecimalField N/A BooleanField BooleanField Boolean
DateTimeField DateTimeField datetime EmbeddedDocumentField None
DictField None ListField None list:string SortedListField None
BinaryField None N/A ObjectIdField None FileField FileField upload
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.