old_contents: # -*- coding: utf-8 -*-
  
  # pylint: disable=E1101
  
  
  from marshmallow.fields import Integer
  from marshmallow.fields import Float
  from marshmallow.fields import String
  from marshmallow.fields import DateTime
  from marshmallow.fields import Email
  from marshmallow.validate import Length
  
  from amnesia.modules.content.validation import ContentSchema
  
  
  class EventSchema(ContentSchema):
      ''' Schema for the Event model '''
  
      content_id = Integer()
      body = String()
      location = String(allow_none=True)
      address = String(allow_none=True)
      address_latitude = Float(allow_none=True)
      address_longitude = Float(allow_none=True)
      attendees = String(allow_none=True)
      contact_name = String(allow_none=True)
      contact_email = Email(allow_none=True)
      contact_phone = String(allow_none=True)
      country_iso = String(allow_none=True, validate=Length(equal=2))
  
      starts = DateTime(required=True)
      ends = DateTime(required=True)
  
new_contents: # -*- coding: utf-8 -*-
  
  # pylint: disable=E1101
  
  from marshmallow.fields import Integer
  from marshmallow.fields import Float
  from marshmallow.fields import String
  from marshmallow.fields import DateTime
  from marshmallow.fields import Email
  from marshmallow.validate import Length
  
  from amnesia.modules.content.validation import ContentSchema
  
  
  class EventSchema(ContentSchema):
      ''' Schema for the Event model '''
  
      content_id = Integer()
      body = String()
      location = String(allow_none=True)
      address = String(allow_none=True)
      address_latitude = Float(allow_none=True)
      address_longitude = Float(allow_none=True)
      attendees = String(allow_none=True)
      contact_name = String(allow_none=True)
      contact_email = Email(allow_none=True)
      contact_phone = String(allow_none=True)
      country_iso = String(allow_none=True, validate=Length(equal=2))
  
      starts = DateTime('%Y-%m-%d %H:%M', required=True)
      ends = DateTime('%Y-%m-%d %H:%M', required=True)
  
subject: use custom format, we don't care about tz