I have a ul
list and a button:
<form>{% csrf_token %}
<div class="list-arrows col-md-1 text-center">
<button class="btn btn-default btn-sm move-left">
<span class="glyphicon glyphicon-chevron-left"></span>
</button>
</div>
</form>
This triggers my ajax request:
function publListChanged()
{
var publs = $('.list-right ul li.active');
Dajaxice.awv_public.reload_stats(Dajax.process, {'publs': '10'})
}
$(function () {
[...]
$('.list-arrows button').click(function () {
var $button = $(this), actives = '';
if ($button.hasClass('move-left')) {
publListChanged();
}
}
}
Currently, for debugging, my method does nothing:
@dajaxice_register
def reload_stats(request, publs):
dajax = Dajax()
return dajax.json()
I get the following error: Dajaxice: Something went wrong.
I have no idea where to look. What should I do?