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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:47:16+00:00 2026-06-12T03:47:16+00:00

I have used custom field in django registration form , every thing is working

  • 0

I have used custom field in django registration form , every thing is working fine but whenever it try to redirect , it shows following error.

I dont know what i missed here.

NoReverseMatch at /accounts/register/
Reverse for 'registration_complete' with arguments '()' and keyword arguments '{}' not found.

I tried following

URL

url(r'^accounts/register/$', register, {'backend': 'registration.backends.default.DefaultBackend','form_class': RegistrationFormEx}, name='registration_register'),

registrationForm.py

from django import forms
from registration.forms import RegistrationForm
from django.utils.translation import ugettext_lazy as _
from registration.models import RegistrationProfile

class RegistrationFormEx(RegistrationForm):
    #ADD ALL CUSTOM FIELDS BELOW
    name=forms.CharField()

models.py

import hashlib
import datetime
import hmac
from django.db import models
from django.contrib.auth.models import User
from ecpCommon.models import StateModel
from ecpCommon.enum import enumauto
from ecpPayments.models import PaymentCard
from registration.signals import user_registered
from apps.ecpUser.models import UserProfile
from apps.ecpMerchant.registrationForm import RegistrationFormEx
from apps.ecpCommon.thumbs import ImageWithThumbsField


class MerchantProfile(StateModel):

    name = models.CharField('Merchant Name', max_length=64)




    def user_created(sender, user, request, **kwargs):
        form = RegistrationFormEx(data=request.POST)
        new_user = User.objects.get(username=request.POST['username'])
        digest=hmac.new(str(request.POST['username'])+str(request.POST['password1']), str(request.POST['password1']),hashlib.sha1).hexdigest()
        new_profile = UserProfile(user=new_user,api_key=digest)
        new_profile.save()
        #now add other fields including password hash as well
        uid = new_profile.id

        merchant_profile = MerchantProfile(user_id=uid,
            create_time=datetime.datetime.now(),
            modified_time=datetime.datetime.now(),
            payment_card_id=uid,
            current_state=1,
            name=request.POST['name'],
             )
        merchant_profile.save()


        return new_user

    user_registered.connect(user_created)
  • 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-12T03:47:18+00:00Added an answer on June 12, 2026 at 3:47 am

    It’s likely because of the registration success redirection in your views is redirecting to a URL: registration_complete, that does not exist.

    To fix it, you should add a url record similar to the one you have for registration_register

    url(r'^accounts/register/$', register, {'backend': 'registration.backends.default.DefaultBackend','form_class': RegistrationFormEx}, name='registration_register'),
    

    that points to the correct url with name=registration_complete.

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

Sidebar

Related Questions

I have created custom registration form in drupal 6. i have used changed the
I have made a custom form in a module where I have used a
I am working in a MySQL database. I have added a custom field to
I have some posts used as events, with a custom field for the event's
I have used custom listview and custom rating bar. If I add that custom
I have used this custom grid view in my code, and I want to
I have used ListView and bounded my custom ArrayAdapter to it. Have setOnItemClickListener(...) bound
I have used the following article as a guide to creating a custom EditorPart
I have used sendinput() function and windows keyboard hooks to develop a custom keyboard
I have built a custom membership provider that I have used in a previous

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.