add same id as value and name now it pops up because of app.js but does override somehow
This commit is contained in:
parent
2a1a565f90
commit
fce2f77cb2
|
@ -16,7 +16,7 @@ def currency_update(request):
|
|||
print('its get method')
|
||||
else:
|
||||
print('its not get method')
|
||||
currency = request.GET.get('currency', None)
|
||||
currency = request.GET.get('currency_update', None)
|
||||
data = ExchangeRate.objects.filter(
|
||||
name__name=currency).values(
|
||||
'exchange_rate_to_chf').latest(
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
$("#currency_update").change(function () {
|
||||
var currency = $(this).val();
|
||||
var currency_update = $(this).val();
|
||||
$.ajax({
|
||||
url: '/ajax/currency_update/',
|
||||
data: {
|
||||
'currency': currency
|
||||
'currency_update': currency_update
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.is_taken) {
|
||||
alert("es pop auf! --dies kommt von: static/js/app.js--.");
|
||||
}
|
||||
alert("es pop auf! --dies kommt von: static/js/app.js--.", data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
<option value="GBP">GBP</option>
|
||||
<option value="JPY">JPY</option>
|
||||
</select>
|
||||
<ul class="nav navbar-nav">
|
||||
{{ form.as_li }}
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue