0

私はPythonとDjangoの初心者なので、ご容赦ください。私がハッキングしているプロジェクトは私が作成したものではないので、暗闇の中でいじっています。

新しいユーザーが作成されると、次のような権限user.has_perm('places.add_place')がなくなり、PostgreSQLテーブルのユーザーIDとは関係がなくなりますauth_permissions。これが症状だと思います。

manage.py flush --settings=settings.jacobが得た場合:

Error: One or more models did not validate:
users.userprofile: "uuid": Primary key fields cannot have null=True.
places.category: "uuid": Primary key fields cannot have null=True.
places.image: "uuid": Primary key fields cannot have null=True.
places.masterplace: "uuid": Primary key fields cannot have null=True.
places.place: "uuid": Primary key fields cannot have null=True.

私が見るテーブルplaces_masterplaceを見るとPrimary key <no primary key>、のようなテーブルにはそれがありますusers_userprofile

とを使用Django==1.4.1South==0.7.6ます。

この問題は、ステージングサーバーでのみ発生します。

これはローカルデータベースの問題である可能性がありますか、それとも本番環境へのデプロイによっても問題が発生する可能性がありますか?

4

1 に答える 1

0

問題は、django-social-authのアップグレードされたバージョンのために現在必要とされている設定のコメント行でした。

'django.contrib.auth.backends.ModelBackend',
于 2012-11-01T14:39:19.347 に答える