Chris
unread,Oct 8, 2008, 7:37:42 AM10/8/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I installed django-registration via easy_install, and followed the
directions for setting it up in my app, but when I go to /register, I
get the error:
File "/usr/lib/python2.5/site-packages/django_registration-0.5-
py2.5.egg/registration/views.py", line 12, in <module>
File "/usr/lib/python2.5/site-packages/django_registration-0.5-
py2.5.egg/registration/forms.py", line 7, in <module>
ImportError: cannot import name newforms
Does anyone know what would cause this error? The line it's
complaining about is "from django import forms", which if I try from
the command line imports just fine.
This is the urls.py I'm using:
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from registration.views import activate
from registration.views import register
urlpatterns = patterns('',
(r'^account/activate/(?P<activation_key>\w+)/$',
activate,
{'template': 'templates/account_activate.html'}
),
(r'^account/login/$',
'django.contrib.auth.views.login',
{'template_name': 'templates/account_login.html'},
),
(r'^account/logout/$',
'django.contrib.auth.views.logout',
{'template_name': 'templates/account_logout.html'},
),
(r'^account/password/change/$',
'django.contrib.auth.views.password_change',
{'template_name': 'templates/account_password_change.html'}
),
(r'^account/password/change/done/$',
'django.contrib.auth.views.password_change_done',
{'template_name': 'templates/
account_password_change_done.html'}
),
(r'^account/password/reset/$',
'django.contrib.auth.views.password_reset',
{'template_name': 'templates/account_password_reset.html'}
),
(r'^account/password/reset/done/$',
'django.contrib.auth.views.password_reset_done',
{'template_name': 'templates/
account_password_reset_done.html'}
),
(r'^account/profile/$',
direct_to_template,
{'template': 'templates/account_profile.html'}
),
(r'^account/register/$',
register,
{'template': 'templates/account_register.html'},
),
(r'^account/register/complete/$',
direct_to_template,
{'template': 'templates/account_registration_complete.html'},
),
)