0

当我尝试通过Django-registration插件向应用程序注册帐户时,Django 不断抛出以下错误。我可以毫无问题地对其他模型进行粗加工操作。

我的环境:Postgresql 8.4 Django 1.4.2

环境:

请求方式:POST 请求地址:localhost:8000/accounts/register/

Django 版本:1.4.2 Python 版本:2.7.3 已安装应用程序:('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django .contrib.messages'、'django.contrib.staticfiles'、'django.contrib.admin'、'django.contrib.humanize'、'django.contrib.gis'、'django.contrib.staticfiles'、'south'、 'dirapp', 'registration', 'django_extensions', 'sorl.thumbnail', 'debug_toolbar') 已安装的中间件: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django .middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')

回溯:get_response 111 中的文件“/root/env27/lib/python2.7/site-packages/django/core/handlers/base.py”。响应=回调(请求,*callback_args,**callback_kwargs)文件“/root /posguide/registration/views.py”在寄存器 187 中。new_user = backend.register(request, **form.cleaned_data) 文件“/root/posguide/registration/backends/default/ init.py" 在寄存器 79. 密码,站点) 文件 "/root/env27/lib/python2.7/site-packages/django/db/transaction.py" 在内部 209. return func(*args, **kwargs) create_inactive_user 中的文件“/root/posguide/registration/models.py” 78. new_user = User.objects.create_user(用户名,电子邮件,密码)文件“/root/env27/lib/python2.7/site-packages/django/ contrib/auth/models.py" 在 create_user 160. user.save(using=self._db) 文件 "/root/env27/lib/python2.7/site-packages/django/db/models/base.py" 在保存 463. self.save_base(using=using, force_insert=force_insert, force_update=force_update) 文件“/root/env27/lib/python2.7/site-packages/django/db/models/base.py”在 save_base 565. created=(not record_exists), raw=raw, using=using) 发送 172 中的文件“/root/env27/lib/python2.7/site-packages/django/dispatch/dispatcher.py”。响应 =接收者(信号=自我,发送者=发送者,**命名)文件“/root/posguide/dirapp/views.py”在 create_user_profile 154. UserProfile.objects.create(用户=实例)文件“/root/env27/lib/ python2.7/site-packages/django/db/models/manager.py" 在create 137. return self.get_query_set().create(**kwargs) 文件"/root/env27/lib/python2.7/site- packages/django/db/models/query.py" 在创建 377.obj.save(force_insert=True, using=self.db) 文件"/root/env27/lib/python2.7/site-packages/django/db /models/base.py" 在保存 463. self.save_base(using=using,force_insert=force_insert, force_update=force_update) 文件 "/root/env27/lib/python2.7/site-packages/django/db/models/base.py" 在 save_base 551. 结果 = manager._insert([self], fields =fields, return_id=update_pk, using=using, raw=raw) _insert 203 中的文件“/root/env27/lib/python2.7/site-packages/django/db/models/manager.py”。返回 insert_query(self .model, objs, fields, **kwargs) 文件 "/root/env27/lib/python2.7/site-packages/django/db/models/query.py" in insert_query 1593. return query.get_compiler(using=using ).execute_sql(return_id) 文件 "/root/env27/lib/python2.7/site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)7/site-packages/django/db/models/base.py”在 save_base 551 中。结果 = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) 文件“/root /env27/lib/python2.7/site-packages/django/db/models/manager.py" in _insert 203. return insert_query(self.model, objs, fields, **kwargs) File "/root/env27/lib /python2.7/site-packages/django/db/models/query.py”在 insert_query 1593 中。返回 query.get_compiler(using=using).execute_sql(return_id) 文件“/root/env27/lib/python2.7/ site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)7/site-packages/django/db/models/base.py”在 save_base 551 中。结果 = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) 文件“/root /env27/lib/python2.7/site-packages/django/db/models/manager.py" in _insert 203. return insert_query(self.model, objs, fields, **kwargs) File "/root/env27/lib /python2.7/site-packages/django/db/models/query.py”在 insert_query 1593 中。返回 query.get_compiler(using=using).execute_sql(return_id) 文件“/root/env27/lib/python2.7/ site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)raw=raw) _insert 203 中的文件“/root/env27/lib/python2.7/site-packages/django/db/models/manager.py”。返回 insert_query(self.model, objs, fields, **kwargs) insert_query 1593 中的文件“/root/env27/lib/python2.7/site-packages/django/db/models/query.py”。返回 query.get_compiler(using=using).execute_sql(return_id) 文件“/root/ env27/lib/python2.7/site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)raw=raw) _insert 203 中的文件“/root/env27/lib/python2.7/site-packages/django/db/models/manager.py”。返回 insert_query(self.model, objs, fields, **kwargs) insert_query 1593 中的文件“/root/env27/lib/python2.7/site-packages/django/db/models/query.py”。返回 query.get_compiler(using=using).execute_sql(return_id) 文件“/root/ env27/lib/python2.7/site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)execute_sql(return_id) 文件 "/root/env27/lib/python2.7/site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)execute_sql(return_id) 文件 "/root/env27/lib/python2.7/site-packages/django/db/models/sql/compiler.py" 在 execute_sql 910. cursor.execute(sql, params)

异常类型:/accounts/register/ 处的内部错误异常值:当前事务被中止,命令被忽略,直到事务块结束

4

0 回答 0