【发布时间】:2013-08-21 16:14:00
【问题描述】:
我使用 django-grappelli 在管理站点上创建可订购的内联。偶尔(不可重现 - 大约 50% 的时间,这特别奇怪),当我尝试从内联中保存排序时,Django 会抛出以下异常:
Exception Type: NoReverseMatch
Exception Value: Reverse for 'grp_related_lookup' with arguments '()' and keyword arguments '{}' not found.
Exception Location: /usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py in render, line 424
有问题的行是这样的:
$("#id_" + this).grp_related_fk({lookup_url:"{% url 'grp_related_lookup' %}"});
根据this related thread 中给出的建议,我已经尝试在 shell 中快速测试它,但它似乎工作正常:
>>> from django.core.urlresolvers import reverse
>>> print reverse('grp_related_lookup')
/grappelli/lookup/related/
我很茫然。有没有人有过类似的经历?
Django 版本是 1.5.1。
【问题讨论】:
标签: python django django-grappelli