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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:04:51+00:00 2026-06-14T21:04:51+00:00

I am trying to allow registration (using this django-registration register view) to one of

  • 0

I am trying to allow registration (using this django-registration register view) to one of my applications from a modal dialog.

Since this form is in a modal box, I’d like to get an json reponse on success (instead of the default redirection)

How can I use this view (django-registration register) to manage the registration and send back a json response on success ?


I know how to make ajax/json responses, the question is how to use the django-registration view without the redirection behavior or wrap it into an other view to manage the response.

  • 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-14T21:04:53+00:00Added an answer on June 14, 2026 at 9:04 pm

    First you need to change the urls.py to wrap the existing view with another functionality. To do that you have to create a new backend package in backends folder and change urls.py there while keeping everything else intact, or you could just go ahead and modify the existing urls.py in the backend package.

    I have not tested this, but it should work.

    Point url to the new view:

    # urls.py
    url(r'^register/$', register_wrap,
        {'backend': 'registration.backends.default.DefaultBackend'},
        name='registration_register'),
    
    # your new view that wraps the existing one
    def register_wrap(request, *args, **kwargs):
    
        # call the standard view here
        response = register(request, *args, **kwargs)
    
        # check if response is a redirect
        if response.status_code == 302:
            # this was redirection, send json response instead
        else:
            # just return as it is
            return response
    

    If you are going to need this for more views you can just create a decorator using this.

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

Sidebar

Related Questions

I am trying to expand the devise registration form to allow a new user
I'm trying to allow users to register on my web application via Facebook. As
I am trying to send data(a username and password) to an online form from
I am trying to make authorize by using web.config. In my user registration, it
I'm trying to build a registration module where user can only register if their
I have a user registration form, in which I am trying to display a
I am trying to implement a registration and login system for my django app
I am trying to allow the user to do this: Lets say initially the
I'm trying to allow users to vote a record up/down with Ajax. I'm using
I am trying to allow people to login using their UserID(int) or their username

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.