-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutorial projects #145
Comments
I've begun following along with the official Django tutorial with neo4django model objects in place of the standard Django ORMs. I figure this is a good way for those who are familiar with that tutorial to approach neo4django for the first time. I'm actually having a problem after creating an app with two model types. When I do a basic query in the shell,
I hope this is useful once I fix whatever is causing this error. My fork is at https://github.com/lukeorland/neo4django-tutorial |
@lukeorland we haven't done a great job keeping the tutorial up-to-date (thus this issue)- but it looks like your problems has to do with your version of Neo4j. What version are you using? And are you using neo4django-dev or 0.1.7 in PyPi? |
@lukeorland I just saw the work you were doing in your fork- that's awesome! Please let me know if I can do anything else to help. |
Thanks for the nice Django module!
I'm using Neo4j 1.8.1. I more or less merged the neo4django
I'm using 0.1.7 in PyPi. Installing Django and neo4django in a virtualenv. This requirements file is being used: |
Definitely try upgrading to Neo4j 1.8.2+ and the latest neo4django (I'd switch to 0.1.7 on PyPi was only tested as far as 1.8M07 I believe, and Neo is changing fast. |
I bumped neo4j to 1.8.2 and neo4django to the version you recommended. It was an improvement. Unfortunately, an all() query did raise an exception: |
Hm, it looks like you're somehow getting "neo4django.tests.test_settings" as your settings module- any ideas? The manage.py looks right. Could your "DJANGO_SEETING_MODULE" env var be set? |
I think it is: $ echo $DJANGO_SETTINGS_MODULE
neo4django.tests.test_settings |
Aha! You want that set to nothing or "mysite.settings". |
As long as you're in the same dir as your manage.py, or |
excellent. That problem fixed. Thanks so much! I'll forge on with more of the tutorial. |
Very cool! Let me know if you have any other issues. |
Don't suppose this type of
|
Actually, it is- https://github.com/scholrly/neo4django/blob/master/neo4django/tests/nodequeryset_tests.py#L515 and it appears to be passing. I believe LEFT was added as a Cypher function in Neo4j 1.8.2- maybe you're still connecting to 1.8.1, or the Cypher parser version is older? Most basic queries should work- it's when you want to query against related objects that there are issues. I'm working on those now (#20). |
Yes, I had 1.8.1 installed to my system (via Homebrew), and though I thought the project's local Neo4j 1.8.2 installation was being run, somehow it was still running the system one. I've uninstalled it from my system, and setting it up freshly locally to try again. sorry about that. edit: confirmed--upgrading to 1.8.2 fixed that startswith query error. |
"Make sure to hit major differences between neo4django, Django proper, and using a bare REST client." you could also make a cursory comparison to ''neomodel'' (https://github.com/robinedwards/neomodel). |
I'm not super familiar with neomodel, but it looks like the big differences
|
That's why I suggested just a cursory treatment, Matt :-) I don't know it well either, actually, I was looking for neo4j ORM (or OGM) for python when I came across both neomodel and neo4django. In fact, I am finding myself learning both just to be able to decide which fits my goal better -- from a users perspective somewhat a waste of time. A comparison of both by the author / lead designer of the library would not only be a aid to the potential future user, but by promoting the benefits of your solution could have an impact on adoption rate and numbers. Just my two cents. |
Agreed, I think it's a good idea. Would you be interested in sharing the results of your comparison, when you I'll also include a quick comparison with bulbflow.
|
Actually, I'm not sure I will dwelve into neomodel (let's see), as the active support of neo4django is a deal-maker :-) Yes, that was a compliment to you! |
Aw, shucks! Well let me know if you decide otherwise. |
Hello @mhluongo. I have the same problem as @lukeorland. Executing .all() in django shell returns: $DJANGO_SETTINGS_MODULE is set to nothing. My Neo4j version is 1.8.3. How can I solve this problem? P.S: Approximately when will the neo4j-2.1.1 compatible neo4django be released? After using 2.1.1, neo4j-1.8.3 really sucks. :) |
@mtndesign unfortunately, I don't have the time to actively develop neo4django anymore- just occasionally patch and merge PRs. The jump to Neo4j 2.0 was too large for me to handle on my own. That said, master on GitHub supports up to 1.9.4, so maybe that'll help. I'm also actively looking for a co-maintainer of the project if you know anyone who would be interested. |
Put together a couple well-documented tutorial projects. Make sure to hit major differences between neo4django, Django proper, and using a bare REST client.
manage.py shell
as a substitute.The text was updated successfully, but these errors were encountered: