AppRegistryNotReady: Apps aren't loaded yet. Django

后端 未结 2 762
傲寒
傲寒 2021-01-05 04:01

I\'m trying to run django 1.9 on google app engine. Got the below error when trying to access API\'s through Google API Explorer.

Traceback (most recent call         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-05 04:45

    You should first initiate django this way in your script:

    import django
    django.setup()
    

    See https://docs.djangoproject.com/en/1.9/ref/applications/#django.setup

    You can also look at the Troubleshooting section of the link to see other possibilities to solve this aprticular exception.

    By adding the above two lines at the top of services.py file solves this problem for me..

提交回复
热议问题