简体   繁体   English

Django数据库如何使用Arangodb?

[英]How to use Arangodb in Django database?

I am starting developing a website, I want to use Django and Arangodb, but Django's built-in databases backend does not support arango.我正在开始开发一个网站,我想使用 Django 和 Arangodb,但是 Django 的内置数据库后端不支持 arango。 django documentation refers to this in database section: django 文档在数据库部分提到了这个:

You can use a database backend that doesn't ship with Django by setting ENGINE to a fully-qualified path (ie mypackage.backends.whatever).您可以通过将 ENGINE 设置为完全限定路径(即 mypackage.backends.whatever)来使用 Django 未附带的数据库后端。

but I could not find anything that bridges between Django and Arango.但我找不到任何连接 Django 和 Arango 的东西。 there is this repo in GitHub https://github.com/pablotcarreira/django-arangodb but this does not support new features of Django and Arango.在 GitHub https://github.com/pablotcarreira/django-arangodb中有这个 repo,但这不支持 Django 和 Arango 的新功能。 I would like any thread to lead me to solve this problem.我希望任何线程都能引导我解决这个问题。

You must first create an app for the database, for example dbms, and then implement all the required items such as crud in a.py file yourself and use the query class in the view you want and return it such as list,dict or... .您必须首先为数据库创建一个应用程序,例如 dbms,然后自己在一个 .py 文件中实现所有必需的项目,例如 crud,并在您想要的视图中使用查询 class 并返回它,例如 list、dict 或。 ……

Note, In the __init __ file, be sure to create an object from the created class注意,在__init__文件中,一定要从创建的class创建一个object

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM