I use django-grappelli to create orderable inlines on the admin site. Occasionally (not reproducibly - about 50% of the time, which is particularly weird), Django throws the following exception when I try to save the ordering from the inline:
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
The offending line is this:
$("#id_" + this).grp_related_fk({lookup_url:"{% url 'grp_related_lookup' %}"});
As per the advice given in this related thread, I've tried quickly testing it in the shell, but it seems to work fine:
>>> from django.core.urlresolvers import reverse
>>> print reverse('grp_related_lookup')
/grappelli/lookup/related/
I'm at a loss. Has anyone made a similar experience?
Django version is 1.5.1.
You probably forgot to add grappelli urls into your urls.py (at least it was the case for me)
url(r'^grappelli/', include('grappelli.urls')),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With