Skip to content
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

django-nonrel with existing database #25

Open
arambadk opened this issue Jul 21, 2015 · 0 comments
Open

django-nonrel with existing database #25

arambadk opened this issue Jul 21, 2015 · 0 comments

Comments

@arambadk
Copy link

Posting my question from stack overflow - http://stackoverflow.com/questions/31442632/django-nonrel-with-existing-legacy-database.

Sorry about filing an issue but I tried to attach the label "question" but was not successful in doing so. Please point me in the right direction if this is against community guidelines.

We have a large existing database and I am using django-nonrel to write an app on it. As far as possible I want to avoid using the pymongo interface to talk to the database.

I used the meta tag db_table to point to the existing collection and executed syncdb without any issues. I can see the collection in the admin view and .objects.all.count() returns the expected value but all the entries are none.

When I try to open an entry from admin view to edit/view it I get error -

AutoField (default primary key) values must be strings representing an ObjectID on MongoDB (got u'' instead)
When I googled I found this solution http://django-mongodb-engine.readthedocs.org/en/latest/troubleshooting.html but this doesnt look like the site ID issue as the value of _id from my mongo database.

Any pointers will be really helpful as replicating the data is not an option.

Thanks Aditya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant