Adicionar classes Event e User

parent 01d898c9
from eventos.core.models.event import Event
from eventos.core.models.user import User
import mongoengine
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.ListField(mongoengine.ReferenceField("User"))
import mongoengine
class User(mongoengine.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)
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