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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:08:08+00:00 2026-06-11T23:08:08+00:00

I am at an absolute loss here as to what I am doing wrong.

  • 0

I am at an absolute loss here as to what I am doing wrong. I am writing a custom backend for django-registration, and as far as I can tell I’m following the instructions perfectly. What argument am I missing to make this work?

Here is my error message:

TypeError at /accounts/register/
CustomSignUpBackend() takes exactly 1 argument (0 given)

Here is my traceback:

Environment:


Request Method: GET
Request URL: http://localhost:8000/accounts/register/

Django Version: 1.4.1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'api',
 'contact',
 'lessons',
 'mainsite',
 'piston',
 'registration',
 'utils')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "c:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "c:\Python27\lib\site-packages\registration\views.py" in register
  178.     backend = get_backend(backend)
File "c:\Python27\lib\site-packages\registration\backends\__init__.py" in get_backend
  32.     return backend_class()

Exception Type: TypeError at /accounts/register/
Exception Value: CustomSignUpBackend() takes exactly 1 argument (0 given)

and here is the relevant line in urls.py:

url(r'^accounts/register/$', register, {'template_name': 'registration/registration_form.html', 'backend': 'lessons.backends.CustomSignUpBackend', 'form_class': MyRegistrationForm}, name='registration_register'),

and finally here is the custom backend code (in lessons/backends/init.py):

class CustomSignUpBackend(DefaultBackend):

    def register(self, request, **kwargs):

        username, email, password = kwargs['username'], kwargs['email'], kwargs['password1']
        if Site._meta.installed:
            site = Site.objects.get_current()
        else:
            site = RequestSite(request)
        new_user = RegistrationProfile.objects.create_inactive_user(username, email,
                                                                    password, site)
        return new_user
  • 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-11T23:08:09+00:00Added an answer on June 11, 2026 at 11:08 pm

    def TeacherSignupBackend(arg) should be class TeacherSignupBackend(parentClass)

    functions take arguments … classes inherit from parent class(es)

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

Sidebar

Related Questions

Disclaimer: absolute novice in Scala :( I have the following defined: def tryAndReport(body: Unit)
I am converting absolute file-system path to relative path using following code. public static
I'm afraid I'm at a loss here, I checked out some similar questions but
How can I assign absolute left 0px OR absolute right 0px depending on if
I'm at a total loss on why I can't align the Search box to
Absolute RoR newbie here, I'm trying to render out multiple leagues in a loop,
I have problems setting absolute position here. I want a.jpg attached on top of
absolute newbie here: I have table with columns: resource, resource_type_field, value. I have this
Absolute beginner question here. I have two lists in mathematica. The first one was
Another absolute beginner here...I have built a page that geolocates the user and places

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.