Django 1.8 RC1: ProgrammingError when creating database tables

前端 未结 4 2226
离开以前
离开以前 2020-12-16 16:03

I\'m using AbstractBaseUser for my user models in various projects. Updating to Django 1.8 RC1 works smoothly and I can run the migrate management command. However, when try

4条回答
  •  忘掉有多难
    2020-12-16 16:26

    To copy the answer I got from the Django ticket mentioned above: Before calling "python manage.py migrate" to create the database layout, one needs to create a migration for the app that contains the custom user class:

    python manage.py makemigrations appname
    

    This creates a migration file within the app directory - et voilà, migrate does work and creates the other tables.

提交回复
热议问题