V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
tikazyq
V2EX  ›  Python

Bokeh+Flask 搭建 Dashboard?

  •  
  •   tikazyq ·
    tikazyq · 2015-04-23 15:42:42 +08:00 · 4474 次点击
    这是一个创建于 3291 天前的主题,其中的信息可能已经有所发展或是发生改变。
    万能的V2EX啊,求帮助~

    小弟最近打算用Bokeh[https://github.com/bokeh/bokeh]为公司创建可视化Dashboard,基于Flask框架。因为前段有些应用已经在跑了,所以不想放弃Flask重新搭积木,把Bokeh嵌入进去就好。

    我已经按照官方教程编写了一个app,可以用bokeh-server运行起来,但这个app里面由于调用了其他模块的function,因此跑的时候加载了两次,bokeh会报错__view_model__重复加载。

    这个怎么解决呢?
    2 条回复    2015-04-23 19:10:01 +08:00
    killpanda
        1
    killpanda  
       2015-04-23 17:56:31 +08:00   ❤️ 1
    可以试试在函数内 import
    tikazyq
        2
    tikazyq  
    OP
       2015-04-23 19:10:01 +08:00
    @killpanda 太感谢了!问题解决了!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5423 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 07:47 · PVG 15:47 · LAX 00:47 · JFK 03:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.