AppRegistryNotReady: Apps aren't loaded yet. Django

后端 未结 2 760
傲寒
傲寒 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:30

    In your script initiate django as:

    from django_root_app.wsgi import application
    
    0 讨论(0)
  • 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..

    0 讨论(0)
提交回复
热议问题