dajaxice:出了点问题 [英] dajaxice: something went wrong

查看:109
本文介绍了dajaxice:出了点问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ul列表和一个按钮:

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>

这会触发我的ajax请求:

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()

我收到以下错误:Dajaxice: Something went wrong.我不知道在哪里看.我该怎么办?

I get the following error: Dajaxice: Something went wrong. I have no idea where to look. What should I do?

推荐答案

我怀疑您使用的是最新版本的Django出了问题.

I suspect what went wrong is that you're using the latest version of Django.

Djaxice是一个无效的项目,在Django 1.6发布后停止工作,尽管似乎没有记录到它崩溃时的确切版本. (在此Github问题中的推断是我能找到的最准确地记录哪些版本坏了.)

Djaxice is a dead project and stopped working after Django 1.6 was released, although the exact version when it broke doesn't appear to be documented. (This inference in this Github issue was the closest I could find to documenting exactly which version broke.)

我曾经尝试在现有项目中升级Django,但发现它破坏了Djaxice. (这已经有一段时间了,所以我不记得是什么错误了.)

I once tried upgrading Django in an existing project and found that it broke Djaxice. (This was a while back, so I don't remember what exactly the error was.)

官方Github存储库引用:我应该使用django-dajaxice吗? ,不."

Quoting from the official Github repo: "Should I use django-dajaxice? In a word, No."

许多人试图将Djaxice移植到较新版本的Django,但我从未见过成功的分叉. (也许是自从我上次查看以来创建了一个新的.)我已经考虑过自己移植它,但发现它并不平凡.

Several people have tried to port Djaxice to newer versions of Django, but I've never seen a successful fork. (Maybe a new one was created since I last looked.) I've looked into porting it myself, but found it to be non-trivial.

这篇关于dajaxice:出了点问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆