def get(self, request, mac):
"""
Handling GET method.
:args
request: Request to View.
mac: mac-address of player.
:return: HttpResponse with project's template and template's hashsum of player,
gotten by mac-address.
"""
player = Player.objects.get(mac_address=mac)
template = player.project.project_template
hashsum = player.project.project_hash
return HttpResponse(json.dumps({"template" : template, 'hashsum': hashsum}))
评论列表
文章目录