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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:40:26+00:00 2026-05-28T13:40:26+00:00

New to python and django .i want to understand the code of django-registration module

  • 0

New to python and django .i want to understand the code of django-registration module for this i want to debug the value in code.
So i m stuck here that

i = path.rfind('.')
    module, attr = path[:i], path[i+1:]

print {i}
#or
import pdb; pdb.set_trace()

my registration form is not showing and gives error .

IndentationError at /accounts/register/
unexpected indent (__init__.py, line 19)
Request Method: GET
Request URL:    http://50.56.78.125:8000/accounts/register/
Django Version: 1.3.1
Exception Type: IndentationError
Exception Value:    
unexpected indent (__init__.py, line 19)

How can i debug or see the value of i .

This is the code :

i = path.rfind('.')
    module, attr = path[:i], path[i+1:]
    try:
        mod = import_module(module)
    except ImportError, e:
        raise ImproperlyConfigured('Error loading registration backend %s: "%s"' % (module, e))
    try:
        backend_class = getattr(mod, attr)
    except AttributeError:
        raise ImproperlyConfigured('Module "%s" does not define a registration backend named "%s"' % (module, attr))
    return backend_class()
  • 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-05-28T13:40:27+00:00Added an answer on May 28, 2026 at 1:40 pm

    Indentations matter a lot in python, and as the error suggests, you have an indentation problem. You should only indent when creating a new block of code, for example after if, for or while statements.

    Just remove the whitespaces before module:

    i = path.rfind('.')
    module, attr = path[:i], path[i+1:]
    
    print i
    #or
    import pdb; pdb.set_trace()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new on Django and Python. I want to write a program with
I'm really new to Python and Django. I created a class in Python that
I'm fairly new to both Django and Python. This is my first time using
Alright, this is probably a really silly question but I am new to Python/Django
I'm new to python and to django so this question will probably be easy
I'm new to Python & Django. I want to allow users to create new
Still new to python and django, though learning ;-) I have a view that
I'm new to Python / GAE / Django. I get that with GAE there
Sorry this is basic, but I'm new to Python and Django. I have a
I'm new to Python and Django. I want to start a Django multi langual

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.