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 9151561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:50:00+00:00 2026-06-17T11:50:00+00:00

Why does this return a NoReverseMatch error? view: def browse(request): thing_list = Thing.objects.all() if

  • 0

Why does this return a NoReverseMatch error?

view:

def browse(request):
    thing_list = Thing.objects.all()
    if request.method == 'POST':
        form = BrowseForm(request.POST)
        if form.is_valid():
            make = Make.objects.all()
            return HttpResponseRedirect(reverse('browse_makes', args=[make]))
    else:
        form = BrowseForm()
    return render(request, 'browse.html', {'form':form, 'thing_list':thing_list})

def makes(request, make):
    ad_list = Thing.objects.filter(make=make)
    return render(request, 'browse-makes.html', {'thing_list':thing_list})

url:

url(r'^browse/$', 'axlepost.views.browse.browse', name='browse'),
url(r'^browse/(?P<make>[\w-]+)/$', 'axlepost.views.browse.makes', name='browse_makes'),

form:

class BrowseForm(forms.Form):
     make = forms.ModelChoiceField(queryset=Make.objects.all())

model:

class Make(models.Model):
    make = models.CharField(max_length=20)

class Thing(models.Model):
    make = models.ForeignKey(Make)

Returns Reverse for 'browse_makes' with arguments '([<Make: Samsung>],)' and keyword arguments '{}' not found.
Thanks for your ideas on how to solve this error!

  • 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-06-17T11:50:01+00:00Added an answer on June 17, 2026 at 11:50 am

    You are handing reverse() a QuerySet rather than 1 value. Also its an .all() query so it may well have multiple objects and it’s not related to the form result.

    make = Make.objects.all() # QuerySet = ([<Make: Samsung>], [<Make: Sony>], [<Make: Apple>], etc)
    return HttpResponseRedirect(reverse('browse_makes', args=[make])) # Expects 1 value
    

    Assuming you want to redirect to the Make selected in the form then you’ll need something like:

    if form.is_valid():
        # Get the valid form data
        cd = form.cleaned_data
    
        # Get the selected Make
        make = cd.get('make')
    
        # Redirect - note 'make.make'.  You want to pass the value not the object
        return HttpResponseRedirect(reverse('browse_makes', kwargs={'make': make.make}))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why does this method return 1 rather than dying from infinite recursion? def foo
Why does this http://graph.facebook.com/mytrimet return this... { error: { message: Unsupported get request., type:
Why does this return NoReverseMatch ? html: {% url vote thing.id thing.slug %} urls.py:
I'm not a sql guru at all but why does this query return error?
can someone please help me. why does this return an error: Dim stuff As
Why does this return an error? public class Class1 { public enum MyEnum {
Why does this code return Specified method is not supported. using System; using System.IO;
What does this error mean in this context? if (value == null) return ;
Why does this return an error? <link rel=shortcut icon type=image/x-icon href=gfx/favicon.ico /> var link
Why does this return a syntax error: function(foo){console.log(foo)} I'd expect this to return the

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.