for andreas

This commit is contained in:
Ivan Hörler 2018-01-14 21:30:57 +01:00
parent 4ea27b0bbc
commit 2117c97874
2 changed files with 4 additions and 4 deletions

View File

@ -11,12 +11,12 @@ from django.http import JsonResponse
def CurrencyUpdate(request):
assert False
currency = request.GET.get('CurrencyUpdate', None)
data = {
'currency': ExchangeRate_name.objects.filter(
name=currency)
'currency': ExchangeRate_name.objects.get(
currency).id
}
print('currency: ', currency, 'data: ', data)
return JsonResponse(data)

View File

@ -1,4 +1,4 @@
$("#id_currency").change(function () {
$("#CurrencyUpdate").change(function () {
var currency = $(this).val();
$.ajax({
url: '/ajax/CurrencyUpdate/',