Django admin and MongoDB, possible at all?

前端 未结 7 693
野的像风
野的像风 2021-02-04 03:01

I\'m building a simple short URL service, ala bitly, for our company use. And I would like to use mongodb to store the data, but I will need some kind of simple interface to add

7条回答
  •  春和景丽
    2021-02-04 03:56

    Django Admin is VERY MUCH possible with MongoDB. Have you looked into the Djongo project?

    Djongo is a SQL to MongoDB query compiler. It translates every SQL query string into a mongoDB query document. As a result,

    • All Django models and related modules work as is.
    • Use the Django Admin GUI to add MongoDB embedded documents.
    • Djongo provides API extensions to the Django ORM that let you ‘embed’ one document inside another, like MongoEngine.

    There is an article on Using Django with MongoDB by adding just one line of code, if you are looking for more information. Otherwise, you can jump directly into the djongo documentation and start using it.

提交回复
热议问题