diff options
Diffstat (limited to 'experiment/views.py')
-rw-r--r-- | experiment/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/experiment/views.py b/experiment/views.py index 1aa79e5..3575094 100644 --- a/experiment/views.py +++ b/experiment/views.py @@ -19,11 +19,11 @@ def initial_login(req): try: assigned_mid = Account.objects.select_related().get(username=username).board.mid except Exception as e: - return HttpResponse(json.dumps({"STATUS": 400, "MESSAGE": "Invalid username"})) + return HttpResponse(json.dumps({"STATUS": 400, "MESSAGE": {"IS_IP":"1","DATA":"Invalid username"}})) rpi_ip = settings.pi_ip_map[str(assigned_mid)] - return HttpResponse(json.dumps({"STATUS": 200, "MESSAGE": rpi_ip})) + return HttpResponse(json.dumps({"STATUS": 200, "MESSAGE": {"IS_IP":"1","DATA":rpi_ip}})) # return HttpResponse(key) # @login_required(redirect_field_name=None) @csrf_exempt |