推荐学习书目
› 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
levey
V2EX  ›  Python

Django + MongoDB 如何?

  •  
  •   levey ·
    levey · Dec 20, 2011 · 6500 views
    This topic created in 5394 days ago, the information mentioned may be changed or developed.
    准备学习server端的技术,这个组合怎么样?
    4 replies  •  1970-01-01 08:00:00 +08:00
    iiduce
        1
    iiduce  
       Dec 20, 2011
    可行。相关组件都可以找到。 我之前用这个组合做过一个项目。
    clker
        2
    clker  
       Dec 21, 2011
    django的model支持MongoDB吗?好像还不支持吧。
    est
        3
    est  
       Dec 21, 2011
    不推荐。

    mongodb不适合ORM。

    在django里可以把mongodb作为辅助存储,但是如果是主要存储,那么django的ORM、admin都废了。能用的就只有模板、Request对象和urls.conf
    pomelo422
        4
    pomelo422  
       Jan 29, 2012
    当然可行,我现在就在使用这个组合学习。

    Django和MongoDB有很多封装好的ORM库可以用:
    http://djangopackages.com/grids/g/mongodb/
    做了些简单比较后我采用的是MongoEngine,和Django原生ORM方式非常相似

    Admin目前还没有很好的方案,但已经有人开始做支持MongoDB的Admin了,试了一下,功能还很原始,但是个不错的开始:
    https://github.com/pydanny/django-mongonaut

    要在Mac下用GUI工具管理MongoDB还有个不错的工具:
    https://github.com/bububa/MongoHub-Mac

    BTW:lz做的Path的QuadCurveMenu很不错啊,有机会多交流。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2711 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:03 · PVG 23:03 · LAX 08:03 · JFK 11:03
    ♥ Do have faith in what you're doing.