Including a third party python package in Django on app-engine
I have a django app running on appengine and it works fine. Now I want to extend it to use a third party python package - googleanalytics. No matter where I put this package django complaints about not finding it (Error was: No module named googleanalytics).
My dir structure is as follows-
app.yaml
myproject -settings.py -manage.py -templates -googleanalytics -urls.py -myapp -views.py (uses googleanalytics package)Per some suggestions here I also tried using -
sys.path.insert(0, ROOT_PATH) I also tried some other paths with this but nothing seems to work. I installed the package and even that does not work.Any pointers woul开发者_JAVA技巧d be appreciated!
Thanks Vivek
sys.path.insert (0, os.path.abspath (
os.path.join (os.path.dirname (__file__), 'googleanalytics')))
I decided to use google app engine helper and that worked like a charm! It was simple to use and I was up and running in 20 minutes. Highly recommend it.
精彩评论