Ejemplo n.º 1
0
	def serialize(self, recurse=True):
		return OrderedDict([
			('id' , self.id),
			('name' , self.name),
			('members', serializeObjs(self.members) if recurse is not False else len(self.members)),
			('events', serializeObjs(self.events.all()) if recurse is not False else len(self.events.all()))
		])
Ejemplo n.º 2
0
 def serialize(self, recurse=True):
     return OrderedDict([
         ('id', self.id), ('name', self.name),
         ('members', serializeObjs(self.members)
          if recurse is not False else len(self.members)),
         ('events', serializeObjs(self.events.all())
          if recurse is not False else len(self.events.all()))
     ])
Ejemplo n.º 3
0
 def serialize(self, recurse=True):
     return OrderedDict([
         ('id' , self.id),
         ('studentNo', self.studentNo),
         ('firstName' , self.firstname),
         ('lastName' , self.lastname),
         ('email' , self.email),
         ('phone' , self.phone),
         ('confirmed', self.confirmed),
         ('organisations', serializeObjs(self.organisations) if recurse is not False else len(self.organisations))
     ])