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

  • Home
  • SEARCH
  • 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 9094519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:22:07+00:00 2026-06-16T23:22:07+00:00

I have an app called workspace, somewhere in my form_valid definition in my def

  • 0

I have an app called workspace,

somewhere in my form_valid definition in my

def form_valid(self, form):
    obj = form.instance
    obj.owner = self.request.user
    obj.sort_order = Project.default_sort_order()
    obj.workspace = get_object_or_404(Workspace, pk=self.kwargs['pk'])
    context = self.get_context_data()
    attribute_form = context['attribute_formset']
    if attribute_form.is_valid():
        self.object = form.save()
        for aform in attribute_form:
            aform.instance.owner = self.request.user
            attribute = aform.save()
            self.object.attributes.add(attribute)
        return HttpResponseRedirect(reverse(self.get_success_url()))
    else:
        return self.render_to_response(self.get_context_data(form=form))

and my definition for the get_success_url:

def get_success_url(self):
        return reverse('workspace_project', kwargs={'pk':self.object.pk})

and my url definition for that is:

url(r'^project/(?P<pk>\d+)$', ProjectDetailView.as_view(), name='workspace_project'),

which is included in the main urlconf like this:

url('^workspace/', include('workspace.urls')),

however, whenever a create is successful, I receive this redirection error:

NoReverseMatch at /workspace/workspace/3/create_project

Reverse for '/workspace/project/12' with arguments '()' and keyword arguments '{}' not found.

I visited the url /workspace/project/12 and I can access it. Why does this err anyway?

Thanks in advance!

  • 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-16T23:22:09+00:00Added an answer on June 16, 2026 at 11:22 pm

    Any reason why you are using reverse() twice? Both in your get_success_url() and in your HttpResponseRedirect(). You also might want to references self.object.get_success_url().

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

Sidebar

Related Questions

We have a C# win Form app called Installer that silently installs various 3rd
I have a wxpython app called h2hh. A user on OSX is getting repeated
We have an app on Facebook called TouchActive We provide ways for user to
i have an app called blog and blog and Post and Categories model. url(r'^(?P<slug>[-\w]+)/$',
I have a RESTful resource in my Rails app called Photo. I'm using Paperclip
I have two Express.js apps running on my server. A plain vanilla app called
I have an Google App Engine entity called MyFile. It has properties such as
I have a main branch with a file called app.js . I made changes
I have an Android app which includes an activity called Help This uses a
I have a model called Customer in google app engine with python: class Customer(db.Model):

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.