From 208f37c2300be07acb9370f346f9df8903e6f679 Mon Sep 17 00:00:00 2001 From: bradybodily Date: Fri, 27 Apr 2018 10:13:39 -0600 Subject: [PATCH] fixed little bug --- .idea/vcs.xml | 6 ++++++ .idea/workspace.xml | 40 +++++++++++++++++++++++----------------- conversion/views.py | 6 +----- 3 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d1e7012..d4a8234 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,9 @@ - + + + + + @@ -160,6 +165,7 @@ \ No newline at end of file diff --git a/conversion/views.py b/conversion/views.py index 70d2893..025651e 100644 --- a/conversion/views.py +++ b/conversion/views.py @@ -7,21 +7,17 @@ import json # Create your views here. def get(request): - print(request) value = request.GET.get('value') frm = request.GET['from'] to = request.GET['to'] - print(value, " ", to, " ", frm) tmp = Converter.objects.get(units=frm) - print(tmp) total = tmp.value * float(value) - print(str(total)) data = {} data['units'] = to data['value'] = total json_data = json.dumps(data) - print(json_data) + return HttpResponse(json_data) def init(request):