Django: “Too many values to unpack” when calling user.objects.get()

前端 未结 2 1966
孤独总比滥情好
孤独总比滥情好 2021-02-13 11:16

In Django 1.6, I\'ve defined a custom user model, but for some reason now when I create a superuser and try to get it or access the Django admin as that superuser, I get this

2条回答
  •  有刺的猬
    2021-02-13 11:35

    You have to implement has_module_perms method as stated in the Django custom user documentation:

    If you want your custom User model to also work with Admin, your User model must define some additional attributes and methods.

提交回复
热议问题