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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:44:20+00:00 2026-05-29T11:44:20+00:00

I have installed django-registration with pip, version 0.7. Then with urls.py from core.forms import

  • 0

I have installed django-registration with pip, version 0.7.

Then with

urls.py

from core.forms import UserRegistrationForm

from registration.views import register

urlpatterns = patterns('',

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

)

core/forms.py

from django import forms
from registration.forms import RegistrationForm
class UserRegistrationForm(RegistrationForm):
    name = forms.CharField()

I’m getting (updated)

ImportError at /accounts/register/

No module named forms

Now, if with a shell i do:

>>> import registration.forms

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/registration/forms.py", line 9, in <module>
    from django.contrib.auth.models import User
  File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/models.py", line 7, in <module>
    from django.db import models
  File "/usr/local/lib/python2.6/dist-packages/django/db/__init__.py", line 14, in <module>
    if not settings.DATABASES:
  File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py", line 276, in __getattr__
    self._setup()
  File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 40, in _setup
    raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

i get this error.

But import registration goes well, and i use in urls.py registration.views.register without problems.

What can i do to debug this problem?

UPDATE: thanks to @DrTyrsa i tried with python manage.py shell

and import registration.forms works, but doesn’t work in my file

>>> import registration.forms
>>> import core.forms
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/var/www/vhosts/opineo/core/forms.py", line 2, in <module>
    from registration.forms import RegistrationForm
ImportError: No module named forms

i don’t understand why.. registration is installed with pip and it’s in the python path

  • 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-29T11:44:21+00:00Added an answer on May 29, 2026 at 11:44 am

    the solution is “im an idiot” 🙂

    while i was checking everything i noticed that i had a folder called registration with an init.py inside.

    That was overwriting django-registration include; renamed it and the error is gone.

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

Sidebar

Related Questions

I have installed and old version by mistake of django-registration and it seems quite
I have django-registration installed. I just updated my Python installation from 2.5 to 2.7.
I have installed Django on Win7 and try >>> import django >>> django.VERSION (1,
I have installed Django on my host (I use their install version 1.1.1), all
So I have installed Django on my FreeBSD 8.2 box like this: pip install
Trying to add django-registration to my app. I have installed setup tools to use
I am using ubuntu and I have installed django from the Ubuntu Software Center.
I have previously had python installed because of postfix. I then installed Django. Next,
I've installed Django-registration succesfully (form this tutorial) . So now I have a Django
I have installed Xperf performance analyzer from Windows SDK and captured a trace as

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.