ViewDoesNotExist at /accounts/register/ (django-registration-me error)

909 Views Asked by At

I am currently working on a project which uses mongoengine and django. I am using django-registration-me to handle user registrations, but I am having problems after submitting the new user registration form.

The error I am receiving is:

"ViewDoesNotExist at /accounts/register/" "Tried settings in module core.views. Error was: 'module' object has no attribute 'settings'"

It sends a verification email out fine though. I am new to django and mongoengine, so any help with this would be greatly appreciated.

The traceback is below.

Environment:

Request Method: POST Request URL: http://dev.teamfit.us:8000/accounts/register/

Django Version: 1.3 beta 1 SVN-15207

Python Version: 2.6.6

Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages',
'registration']

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')

Traceback:

File "/usr/src/django-trunk/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.6/dist-packages/django_registration_me-0.7-py2.6.egg/registration/views.py" in register 153. return HttpResponseRedirect(success_url or reverse('registration_complete'))

File "/usr/src/django-trunk/django/core/urlresolvers.py" in reverse 390. *args, **kwargs)))

File "/usr/src/django-trunk/django/core/urlresolvers.py" in reverse 311. possibilities = self.reverse_dict.getlist(lookup_view)

File "/usr/src/django-trunk/django/core/urlresolvers.py" in _get_reverse_dict 228. self._populate()

File "/usr/src/django-trunk/django/core/urlresolvers.py" in _populate 219. lookups.appendlist(pattern.callback, (bits, p_pattern))

File "/usr/src/django-trunk/django/core/urlresolvers.py" in _get_callback 169. raise ViewDoesNotExist("Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e)))

Exception Type: ViewDoesNotExist at /accounts/register/

Exception Value: Tried settings in module core.views. Error was: 'module' object has no attribute 'settings'

1

There are 1 best solutions below

0
On

I guess, you have

import settings

or some such variation in your code.

You should change it to:

from django.conf import settings

and it should work