Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6372847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:17:20+00:00 2026-05-25T01:17:20+00:00

I’ve been working on a django project for a while now that uses grappelli

  • 0

I’ve been working on a django project for a while now that uses grappelli for the admin and all of a sudden today my change_form.html template is throwing the following error:

Caught NoReverseMatch while rendering: Reverse for "grp_related_lookup" with arguments '()' and keyword arguments '{}' not found.

The offending line of code is line 38:

37    $.each(related_lookup_fields_fk, function() {
38        $("#id_" + this).grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});
39    });

which is preceded by this bit of code:

var related_lookup_fields_fk = {% get_related_lookup_fields_fk adminform.model_admin %};

Obviously it’s the {% url grp_related_lookup %} bit that’s causing the problem.

I don’t understand how the template is resolving grp_related_lookup to grappelli.views.related.related_lookup. I have tried replacing grp_related_lookup with grappelli.views.related.related_lookup and that didn’t work either. Also, in the template the offending line looks like this:

$("#id_" + this).grp_related_fk({lookup_url:"{% url grp_related_lookup %}"});

but in the error message it looks like this:

$("#id_" + this).grp_related_fk({lookup_url:"{% url 'grp_related_lookup' %}"});

I don’t know if the single quotes surrounding grp_related_lookup might have something to do with the problem or not. Is that how django rendered the function call? Is it passing the string 'grp_related_lookup' to the url template tag? If so, what might have caused this to break suddenly?

Some additional info:

  • The value of related_lookup_fields is an empty list []. I am not defining any related_lookup_fields in my admin.py.
  • I threw a couple debug statements into the grappelli.views.related.related_lookup view function and it doesn’t appear to be getting called.
  • I have not touched any of the templates recently.

Hopefully someone can point me in the right direction… Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:17:21+00:00Added an answer on May 25, 2026 at 1:17 am

    Do you still have 'grappelli.urls' included in your URLconf? That the only reason I see that would cause this error. You can try using python manage.py shell:

    from django.core.urlresolvers import reverse
    print reverse('grp_related_lookup')
    

    If this line returns the correct URL, you shouldn’t get a NoReverseMatch in your template.

    The quotes around grp_related_lookup shouldn’t be a concern. The {% url %} tag accepts both quoted and unquoted strings as first argument, so django normalizes it to quoted strings. This behaviour is going to change in the future: you’ll be able to pass template variables to {% url %} using unquoted strings. {% url foo %} and {% url "foo" %} won’t give the same result, see the 1.3 release notes for details about this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.