简体   繁体   中英

How to configure django settings.py for neo4j?

I'm trying to write a simple application with django and neo4j.

I downloaded neo4j-django-tutorial from github, and run it step by step.

However, I found that in settings.py of this tutorial, the db is configured as follows:

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.sqlite3',
    'NAME': join(NEO4JTUT_ROOT, 'db/neo4jtut.sqlite'),
}
}

I doubt that this project is still using sqlite3 as backend db, not neo4j.

What should I do to configure it with neo4j? Thanks.

This project uses both neo4j and sqlite3. As you can see in models.py und views.py in apps/neo4japp nodes are also stored in sqlite3 but some queries are sent to neo4j through new4jclient.py.

For using neo4j as a database backand this should help: Developing a web application in python with neo4j

Try the Bulbs Quickstart: http://bulbflow.com/quickstart/

It's a normal Python library that uses Neo4j Server (which is free) instead of Neo4j Embedded, so you don't have to mess with Java. Neo4j Server works better with Web frameworks like Django and Flask.

And once you have your app built, you can run it for free on Heroku with the Neo4j Add On.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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