newforms admin and Django registration

2 views
Skip to first unread message

Michael Newman

unread,
Feb 12, 2008, 11:41:29 PM2/12/08
to Django users
It took a couple of days, but I finally got all my projects switched
to new forms admin. It is so powerful. I cannot wait to see wait to
see what kinds of things I will be ablt to accomplish.

That being said, of course, I need to switch some of the snippets of
code that I barrowed from people smarter than me. One such person is
Jame Bennett and django-registration has been an invaluable tool. One
of the sites I switched uses that code, and I went into models and
tried my hardest to find and replace all the code that has changed.

The admin works fine database looks good and the shell seems to be in
order too on the simple tests that I run. I am just having one error
that I just can't figure out (thus I am still at work at 11:30). Here
is the error I am getting on any registration page:
URI: '/registration/registration'
Location: '/'
Directory: None
Filename: '/var/www/vhosts/development/registration'
PathInfo: '/registration'

Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'

Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)

File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
1128, in _execute_target
result = object(arg)

File "/usr/lib/python2.5/site-packages/django/core/handlers/
modpython.py", line 188, in handler
return ModPythonHandler()(req)

File "/usr/lib/python2.5/site-packages/django/core/handlers/
modpython.py", line 161, in __call__
response = self.get_response(request)

File "/usr/lib/python2.5/site-packages/django/core/handlers/
base.py", line 64, in get_response
response = middleware_method(request)

File "/usr/lib/python2.5/site-packages/django/middleware/common.py",
line 57, in process_request
urlresolvers.resolve(request.path)

File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 292, in resolve
return get_resolver(urlconf).resolve(path)

File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 233, in resolve
sub_match = pattern.resolve(new_path)

File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 231, in resolve
for pattern in self.urlconf_module.urlpatterns:

File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py",
line 255, in _get_urlconf_module
raise ImproperlyConfigured, "Error while importing URLconf %r: %s"
% (self.urlconf_name, e)

ImproperlyConfigured: Error while importing URLconf
'registration.urls': cannot import name UserCreationForm

Any one who has any insight as to what this error means or experience
with django-registration in newforms admin and would care to share it,
I would be very grateful. I found this ticket http://code.djangoproject.com/ticket/6572
, but I assume it is my code and not a bug. Thanks in advance.

Michael Newman

Michael Newman

unread,
Feb 13, 2008, 10:52:01 AM2/13/08
to Django users
I am exploring this further in the morning and I am wondering if the
issue is the fact that django.contrib.auth.views uses the oldform
methods. Could this be what is throwing this error? Is there or are
there plans for converting django.contrib.auth.forms to new forms? If
I spent time doing that would it be time well spent?
> I would be very grateful. I found this tickethttp://code.djangoproject.com/ticket/6572

Aaron Fay

unread,
Feb 19, 2008, 11:29:26 AM2/19/08
to django...@googlegroups.com
Hi Michael,

I was wondering if you made any progress on this app with newforms-admin.  I am developing in newforms admin right now and realizing more and more that a lot of available applications out there haven't made the switch yet, so the question becomes: spend the time writing my own, or converting existing applications?  Either one might take me further down the rabbit hole than I want to go :P

Thanks,
Aaron

Michael Newman

unread,
Feb 19, 2008, 12:52:05 PM2/19/08
to Django users
I actually fixed this problem and submitted a current patch
http://code.djangoproject.com/ticket/6083 , although there are still a
few bugs that I fix in a new patch that I will post as soon as I have
a logic question answered on Django Devs:
https://groups.google.com/group/django-developers/browse_thread/thread/ba8b115b74d6e502
. Also I submitted a patch to Django Registration that wasn't accepted
http://code.google.com/p/django-registration/issues/detail?id=74&can=1
. I am very interested in seeing this branch merged soon, because it
is so much more powerful and simple. Let me know what applications you
are talking about and I can lend a hand at getting them converted, it
is becoming old hat at this point and really isn't too difficult.
Reply all
Reply to author
Forward
0 new messages