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):