コード例 #1
0
ファイル: views.py プロジェクト: Govexec/django-cropduster
def get_ratio(request): 
	return HttpResponse(json.dumps(
		[u"%s" % aspect_ratio(request.GET["width"], request.GET["height"])]
	))
コード例 #2
0
	def save(self, *args, **kwargs):
		self.aspect_ratio = utils.aspect_ratio(self.width, self.height)
		super(Size, self).save(*args, **kwargs)
コード例 #3
0
def get_ratio(request):
    return HttpResponse(
        json.dumps([
            u"%s" % aspect_ratio(request.GET["width"], request.GET["height"])
        ]))