for andreas
This commit is contained in:
parent
4ea27b0bbc
commit
2117c97874
|
@ -11,12 +11,12 @@ from django.http import JsonResponse
|
||||||
|
|
||||||
|
|
||||||
def CurrencyUpdate(request):
|
def CurrencyUpdate(request):
|
||||||
assert False
|
|
||||||
currency = request.GET.get('CurrencyUpdate', None)
|
currency = request.GET.get('CurrencyUpdate', None)
|
||||||
data = {
|
data = {
|
||||||
'currency': ExchangeRate_name.objects.filter(
|
'currency': ExchangeRate_name.objects.get(
|
||||||
name=currency)
|
currency).id
|
||||||
}
|
}
|
||||||
|
print('currency: ', currency, 'data: ', data)
|
||||||
return JsonResponse(data)
|
return JsonResponse(data)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$("#id_currency").change(function () {
|
$("#CurrencyUpdate").change(function () {
|
||||||
var currency = $(this).val();
|
var currency = $(this).val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/ajax/CurrencyUpdate/',
|
url: '/ajax/CurrencyUpdate/',
|
||||||
|
|
Loading…
Reference in New Issue