Arrumar models Event e User

parent efca9310
import mongoengine
from mongoengine import Document, fields
class User(mongoengine.EmbeddedDocument):
class Event(Document):
id = mongoengine.StringField(field="id", max_length=255, required=True)
first_name = mongoengine.StringField(field="first_name", max_length=255, required=True)
last_name = mongoengine.StringField(field="last_name", max_length=255, required=True)
email = mongoengine.EmailField(field="email", max_length=255, required=True)
class Event(mongoengine.Document):
name = mongoengine.StringField(max_length=255, required=True)
name_english = mongoengine.StringField(max_length=255, required=True)
starts_on = mongoengine.DateTimeField(required=True)
ends_on = mongoengine.DateTimeField(required=True)
local = mongoengine.StringField(max_length=255, required=True)
description = mongoengine.StringField(max_length=255, required=True)
owner = mongoengine.EmbeddedDocumentListField(User)
name = fields.StringField(max_length=255, required=True)
name_english = fields.StringField(max_length=255, required=True)
starts_on = fields.DateTimeField(required=True)
ends_on = fields.DateTimeField(required=True)
local = fields.StringField(max_length=255, required=True)
description = fields.StringField(max_length=255, required=True)
import mongoengine
from mongoengine import Document, fields
class User(mongoengine.Document):
class User(Document):
first_name = mongoengine.StringField(max_length=255, required=True)
last_name = mongoengine.StringField(max_length=255, required=True)
email = mongoengine.EmailField(max_length=255, required=True)
password = mongoengine.StringField(max_length=255, required=True)
first_name = fields.StringField(max_length=255, required=True)
last_name = fields.StringField(max_length=255, required=True)
email = fields.EmailField(max_length=255, required=True)
password = fields.StringField(max_length=255, required=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment