包括Django中的第三方python软件包在应用引擎上 [英] Including a third party python package in Django on app-engine

查看:129
本文介绍了包括Django中的第三方python软件包在应用引擎上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个django应用程序在appengine上运行,它的工作正常。现在我想扩展它使用第三方python包 - 谷歌分析。无论我在哪里放这个包django投诉没有找到它(错误是:没有名为googleanalytics的模块)。



我的目录结构如下 -



app.yaml

myproject

   -settings.py

   -manage。 py

   -templates

   -googleanalytics

   -urls.py

  ;  -myapp

     -views.py(使用googleanalytics包)



根据这里的一些建议我也尝试使用 -

sys.path.insert(0,ROOT_PATH)
我也尝试了一些其他路径,但似乎没有任何工作。我安装了软件包,即使这样也不行。



任何指针都将不胜感激!



谢谢
Vivek

解决方案

我决定使用谷歌应用程序引擎助手,这样做就像一个魅力!使用起来很简单,20分钟后就开始运行了。强烈推荐


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 would be appreciated!

Thanks Vivek

解决方案

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.

这篇关于包括Django中的第三方python软件包在应用引擎上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆