Revision history [back]
email and ValidationError
when I want to create an account, the account/signup page always alert that "this email address is not authorized" and when I want to signin with a existed user in DB, it raise a error: ValidationError at account/siginin/
here are the traceback:
Environment:
Request Method: POST
Django Version: 1.5.1 Python Version: 2.7.9 Installed Applications: ('longerusername', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.humanize', 'django.contrib.sitemaps', 'django.contrib.messages', 'compressor', 'askbot', 'askbot.deps.django_authopenid', 'south', 'askbot.deps.livesettings', 'keyedcache', 'robots', 'django_countries', 'djcelery', 'djkombu', 'followit', 'tinymce', 'group_messaging') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware', 'askbot.middleware.forum_mode.ForumModeMiddleware', 'askbot.middleware.cancel.CancelActionMiddleware', 'django.middleware.transaction.TransactionMiddleware', 'askbot.middleware.view_log.ViewLogMiddleware', 'askbot.middleware.spaceless.SpacelessMiddleware')
Traceback: File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response 115. response = callback(request, callback_args, callback_kwargs) File "C:\Python27\lib\site-packages\django\utils\decorators.py" in _wrapped_view 91. response = view_func(request, *args, *kwargs) File "d:\myapp\code\askbot-devel\askbot-devel-master\askbot\deps\django_authopenid\views.py" in signin 543. method = 'password', File "C:\Python27\lib\site-packages\django\contrib\auth__init__.py" in authenticate 59. user = backend.authenticate(credentials) File "C:\Python27\lib\site-packages\django\contrib\auth\backends.py" in authenticate 16. user = UserModel._default_manager.get_by_natural_key(username) File "C:\Python27\lib\site-packages\django\contrib\auth\models.py" in get_by_natural_key 168. return self.get(*{self.model.USERNAME_FIELD: username}) File "C:\Python27\lib\site-packages\django\db\models\manager.py" in get 143. return self.get_query_set().get(args, *kwargs) File "C:\Python27\lib\site-packages\django\db\models\query.py" in get 382. num = len(clone) File "C:\Python27\lib\site-packages\django\db\models\query.py" in __len__ 90. self._result_cache = list(self.iterator()) File "C:\Python27\lib\site-packages\django\db\models\query.py" in iterator 311. obj = model(row_data) File "C:\Python27\lib\site-packages\django\db\models\base.py" in __init__ 348. setattr(self, field.attname, val) File "build\bdist.win-amd64\egg\jsonfield\subclassing.py" in __set__ 41. obj.__dict__[self.field.name] = self.field.pre_init(value, obj) File "build\bdist.win-amd64\egg\jsonfield\fields.py" in pre_init 81. raise ValidationError(_("Enter valid JSON"))
Exception Type: ValidationError at /account/signin/ Exception Value: [u'Enter valid JSON']