How to use custom python libraries and apps in Google App Engine?

后端 未结 1 815
囚心锁ツ
囚心锁ツ 2021-01-21 17:49

I would like to know how to install and use third party libraries and/or apps in django nonrel at Google App Engine?

Currently my web application uses django-nonrel and

相关标签:
1条回答
  • 2021-01-21 18:38

    Put the library you want in the root of your app path (same place as your app.yaml). You will need to do this (or a variation) so that all the files of your library are uploaded to App Engine's servers when you deploy. Your actual PYTHONPATH on your machine isn't used directly.

    One common variation to this is to put symlinks to your libraries in your main app path. So here are some variations:

    1. Use pip to install django-social-auth, and create the symlink myapp/social_auth to point to the place where pip installed social auth.

    2. Download the source from github and copy the social_auth folder directly into your myapp folder.

    3. Sync the github repo for django-social-auth, and create the symlink myapp/social_auth to point to the place django-social-auth/social_auth.

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