lazy reference: doesn't provide model user?

后端 未结 9 1368
独厮守ぢ
独厮守ぢ 2020-12-15 06:33

Currently I\'m using Django 1.11 and Python 3.6. I\'m attempting to create a custom user model with a new application that authenticates with LDAP, but i\'m greeted with th

9条回答
  •  一生所求
    2020-12-15 07:04

    WARNING: It will destroy Your current User/Group/Auth tables and entries connected with User model

    Actually in django 1.9+ this is enough:

    • drop all auth_* and django_admin_log tables using the following statement :

    DROP TABLE django_admin_log, auth_group, auth_group_permissions, auth_permission, auth_user, auth_user_groups, auth_user_user_permissions CASCADE;

    • delete all migrations connected with django_admin and auth apps with:

    DELETE FROM django_migrations WHERE app='admin' or app='auth';

    • Then simply run:

    ./manage.py migrate

提交回复
热议问题