Closed gustavklopp closed 9 years ago
I cannot reproduce this issue, are you sure your database routers are properly defined? A sample project might help debug this issue.
I've only used using(my_database)
. (Using only that works when I'm trying to fetch my data from my database.)
Do I need to use a "Database router"? https://docs.djangoproject.com/en/1.7/topics/db/multi-db/#using-routers
Could you describe shortly how to set it up for django-contrib-comments?
django-contrib-comments cannot magically guess the database your object is located in. So you should either configure database routers or provide your own custom post_comment
view that will compute or hard-code the database alias, then call the django-contrib-comments post_comment
view providing a non-null using
argument. I think the first solution is preferable if possible.
When using several databases (which is allowed by Django : https://docs.djangoproject.com/en/1.7/topics/db/multi-db/) , django-contrib-comments raises an error when trying to post a comment.
Problem with the query inside
post_comment
function where there's no taking into account of multiple databases by ausing(database)
property? (as defined in the django docs to make a query with multiple databases: https://docs.djangoproject.com/en/1.7/topics/db/multi-db/#manually-selecting-a-database )