nicer indented json encoding now also in rest api
This commit is contained in:
parent
55fc17e872
commit
84bb9ad73a
10 changed files with 62 additions and 40 deletions
|
@ -54,6 +54,12 @@ class Package(models.Model):
|
|||
def package(self):
|
||||
return self
|
||||
|
||||
@property
|
||||
def bounds(self):
|
||||
if self.bottom is None:
|
||||
return None
|
||||
return ((float(self.bottom), float(self.left)), (float(self.top), float(self.right)))
|
||||
|
||||
def tofile(self):
|
||||
data = OrderedDict()
|
||||
data['name'] = self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue