Runtime error:App registry isn't ready yet

后端 未结 3 1753
盖世英雄少女心
盖世英雄少女心 2020-12-28 08:56

I am trying to create a script that populates a database with test users. I am new to Django and Python. I keep on getting:

Runtime error: App registry isn\'         


        
3条回答
  •  失恋的感觉
    2020-12-28 09:13

    I found out that if I run populate through the manage.py shell with the execfile() command then it runs properly. Everything needed to be setup before I start modifying the database or run outside code. Thanks to lanzz for the hint.

提交回复
热议问题