在升级到djongo 1.3.6之后,我收到这个错误 ERRORS: some_app.Some_Class: (models.E026) The model cannot have more than one field with 'primary_key=True'. 这是给出错误的类: # some_app/some_class.py
_id = models.ObjectIdField()
event_id = models.In
为什么这会显示警告,因为默认情况下,从用户模型中获取主键,所以我也应该再次声明主键,即注册或候选模型。models.pyfrom django.contrib.auth.models import User
# Create your modelspoll.candidate: (models.W042) Auto-created primary key used when not defining a primary key