2012-03-06 50 views
2

私はdjango-userenaデモプロジェクトをテストしています。私はsendmailをインストールしました。私はsyncdbの実行を実行したときこのエラーが表示されるのはなぜですか

Environment: 


Request Method: POST 
Request URL: http://127.0.0.1:8000/accounts/signup/ 

Django Version: 1.3.1 
Python Version: 2.7.2 
Installed Applications: 
['django.contrib.auth', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.sites', 
'django.contrib.messages', 
'django.contrib.admin', 
'easy_thumbnails', 
'guardian', 
'south', 
'userena', 
'userena.contrib.umessages', 
'demo_project.profiles'] 
Installed Middleware: 
('django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.locale.LocaleMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'userena.middleware.UserenaLocaleMiddleware') 


Traceback: 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 
    111.       response = callback(request, *callback_args, **callback_kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/decorators.py" in _wrapped_view 
    28.   return view_func(request, *args, **kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/views.py" in signup 
    69.   if form.is_valid(): 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in is_valid 
    121.   return self.is_bound and not bool(self.errors) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in _get_errors 
    112.    self.full_clean() 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in full_clean 
    267.   self._clean_fields() 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/forms/forms.py" in _clean_fields 
    287.      value = getattr(self, 'clean_%s' % name)() 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/forms.py" in clean_username 
    49.    user = User.objects.get(username__iexact=self.cleaned_data['username']) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/manager.py" in get 
    132.   return self.get_query_set().get(*args, **kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in get 
    344.   num = len(clone) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__ 
    82.     self._result_cache = list(self.iterator()) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator 
    273.   for row in compiler.results_iter(): 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter 
    680.   for rows in self.execute_sql(MULTI): 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 
    735.   cursor.execute(sql, params) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute 
    34.    return self.cursor.execute(sql, params) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in execute 
    86.    return self.cursor.execute(query, args) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/cursors.py" in execute 
    174.    self.errorhandler(self, exc, value) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/connections.py" in defaulterrorhandler 
    36.  raise errorclass, errorvalue 

Exception Type: DatabaseError at /accounts/signup/ 
Exception Value: (1146, "Table 'demo_project.auth_user' doesn't exist") 

編集

私は以前この質問を更新できませんでした申し訳ありませんが、私は、とても忙しかった、私はこれを参照してください。私はサインアップ時

私はこのエラーを参照してくださいエラー

Environment: 


Request Method: POST 
Request URL: http://127.0.0.1:8000/accounts/signup/ 

Django Version: 1.3.1 
Python Version: 2.7.2 
Installed Applications: 
['django.contrib.auth', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.sites', 
'django.contrib.messages', 
'django.contrib.admin', 
'easy_thumbnails', 
'guardian', 
'south', 
'userena', 
'userena.contrib.umessages', 
'demo_project.profiles'] 
Installed Middleware: 
('django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.middleware.locale.LocaleMiddleware', 
'django.middleware.csrf.CsrfViewMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'userena.middleware.UserenaLocaleMiddleware') 


Traceback: 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 
    111.       response = callback(request, *callback_args, **callback_kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/decorators.py" in _wrapped_view 
    28.   return view_func(request, *args, **kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/views.py" in signup 
    70.    user = form.save() 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/forms.py" in save 
    86.              userena_settings.USERENA_ACTIVATION_REQUIRED) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/managers.py" in create_user 
    62.   userena_profile = self.create_userena_profile(new_user) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/userena/managers.py" in create_userena_profile 
    104.       activation_key=activation_key) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/manager.py" in create 
    138.   return self.get_query_set().create(**kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in create 
    360.   obj.save(force_insert=True, using=self.db) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/base.py" in save 
    460.   self.save_base(using=using, force_insert=force_insert, force_update=force_update) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base 
    553.      result = manager._insert(values, return_id=update_pk, using=using) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/manager.py" in _insert 
    195.   return insert_query(self.model, values, **kwargs) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/query.py" in insert_query 
    1436.  return query.get_compiler(using=using).execute_sql(return_id) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 
    791.   cursor = super(SQLInsertCompiler, self).execute_sql(None) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 
    735.   cursor.execute(sql, params) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute 
    34.    return self.cursor.execute(sql, params) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in execute 
    86.    return self.cursor.execute(query, args) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/cursors.py" in execute 
    174.    self.errorhandler(self, exc, value) 
File "/home/elie/.django-projects/showpill/local/lib/python2.7/site-packages/MySQLdb/connections.py" in defaulterrorhandler 
    36.  raise errorclass, errorvalue 

Exception Type: DatabaseError at /accounts/signup/ 
Exception Value: (1146, "Table 'demo_project.userena_userenasignup' doesn't exist") 

第二EDIT

これはこれは私がエラーを見てい本家、ユーザ名と電子メールがDBに保存されていることに注意してください./manage.py migrate

Running migrations for easy_thumbnails: 
- Nothing to migrate. 
- Loading initial data for easy_thumbnails. 
No fixtures found. 
Running migrations for guardian: 
- Nothing to migrate. 
- Loading initial data for guardian. 
No fixtures found. 
Running migrations for userena: 
- Nothing to migrate. 
- Loading initial data for userena. 
No fixtures found. 
Running migrations for umessages: 
- Nothing to migrate. 
- Loading initial data for umessages. 
No fixtures found. 

の出力であるsyncdb

Syncing... 
Creating tables ... 
Installing custom SQL ... 
Installing indexes ... 
No fixtures found. 

Synced: 
> django.contrib.auth 
> django.contrib.contenttypes 
> django.contrib.sessions 
> django.contrib.sites 
> django.contrib.messages 
> django.contrib.admin 
> south 
> demo_project.profiles 

Not synced (use migrations): 
- easy_thumbnails 
- guardian 
- userena 
- userena.contrib.umessages 
(use ./manage.py migrate to migrate these) 

の出力です。

私がログインしている場合、それは私が自分のパスワードをリセットしようとした場合、それはあなたがsyncdbの実行を実行する必要が

That e-mail address doesn't have an associated user account. Are you sure you've registered?

+0

@Mat申し訳ありませんが、私はエラーが大きいと思っていたので、できるだけ短い質問を残そうとしましたが、あなたは正しいです。これからは – user

答えて

3

私はあなたのデータベースを削除する必要があると思います。次に、再度manage.py syncdbmanage.py migrateを新しいDBで行います。 manage.py migrateを実行すると、投稿した出力が得られません。あなたの出力はテーブルを変更したり作成したりすることはありません。必要なテーブルが作成されていない可能性があります。

  1. This is what the output should look like after a manage.py syncdb.
  2. This is what the output should look like after a manage.py migrate.

あなたはuserenaを提供demo_projectの合計で21個のテーブルを持っている必要があります。このプロジェクトの作業を取得するための手順があるべき一般的なヘルプについては


  1. 仮想環境を作成し、pip install django-userena
  2. がuserena
  3. が付属していますdemo_projectは、プロジェクトのディレクトリにvirtualenvのは、cdを有効にして、あなたのmanage.py syncdbmanage.py migrate
  4. プロジェクト
を実行してください引き出し

私はこれを今行っており、これらの手順が完了したらdemo_project帽子が動作します。

* /accounts/signup/ページでユーザーにサインインする場合は、覚えておいてください。このユーザーはデフォルトで/admin/にサインインできません。管理者にプロファイルを与えない限り、スーパーユーザーのユーザーは/accounts/(profile)/の下に自分のプロフィールにアクセスすることはできません。

+0

を読んでください[see] [this](http://pastebin.com/KjJBgrb9)のエラーは正常ですか? – user

+0

これは正常ではありません。エラーは一切ありません。いつそのエラーが起こるのですか?新しいユーザーにサインアップしようとするとどうなりますか? – darren

+0

申し訳ありませんが、あなたが説明したように 'syncdb'と' migrate'の出力はexacltyです – user

5

を言うyour account has been disabled

を言う:manage.py syncdb

あなたがいることが働いてきましたあなたはまた、様々な南のコマンドを使用する必要があります。

ここで2つの質問が発生します。南を走った後もまだこれらのエラーが発生していますか?第2に、エラーメッセージ(Exception Value: (1146, "Table 'demo_project.userena_userenasignup' doesn't exist"))で指定されたテーブルが実際に存在していますか?テーブルが存在する場合はデータベースを調べ、存在する場合は正しいデータベースに存在するかどうか調べます。

+0

私の編集をお読みくださいsit – user

+0

@user:syncdbを実行したときにそのエラーは発生しません。 – Marcin

+0

syncdbを実行しなかったので最初のエラーが出ましたが、syncdbの実行後に2番目のエラーが発生しました – user

関連する問題