def get_ratio(request): return HttpResponse(json.dumps( [u"%s" % aspect_ratio(request.GET["width"], request.GET["height"])] ))
def save(self, *args, **kwargs): self.aspect_ratio = utils.aspect_ratio(self.width, self.height) super(Size, self).save(*args, **kwargs)
def get_ratio(request): return HttpResponse( json.dumps([ u"%s" % aspect_ratio(request.GET["width"], request.GET["height"]) ]))