for andreas
This commit is contained in:
parent
4ea27b0bbc
commit
2117c97874
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$("#id_currency").change(function () {
|
||||
$("#CurrencyUpdate").change(function () {
|
||||
var currency = $(this).val();
|
||||
$.ajax({
|
||||
url: '/ajax/CurrencyUpdate/',
|
||||
|
|
Loading…
Reference in New Issue