Re: [Error] Mixing Two databases
Hi, On Fri, Feb 10, 2012 at 7:27 PM, Dennis Lee Bieberwrote: > On Fri, 10 Feb 2012 09:32:02 +0530, Subhodip Biswas > wrote: > > > >>I am getting a error like this : >>django.db.utils.DatabaseError: Ordering can't span tables on >>non-relational backends >> > You don't, by some chance, have a model in one with a foreign key > reference in the other? I am trying to setup Geodjango over postgres. Since I am explicitly mentioning my model to use postgres and not mongoDB. I thought I had clear shot. but that is not the case and might be the cause of the problem. So how do I handle the settings now? Any Ideas and pointers would help. - Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: [Error] Mixing Two databases
You might be using joins in one or more of your MongoDB model declarations. Check with the Meta section of the Mongo models. Infact, if you are trying to span across collections in your non-relational database on purpose, then something basic might be going wrong. On Fri, Feb 10, 2012 at 9:32 AM, Subhodip Biswaswrote: > Hi all, > > I am trying to use two database for my django(Django nonrel 1.3.1) > project. One is Postgres and other is MongoDB. > After filling in details in settings.py : > > DATABASES = { >'default': { >'ENGINE': 'django_mongodb_engine', # Add > 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. >'NAME': 'Mongo_MSTR', # Or path to > database file if using sqlite3. >'USER': '', # Not used with sqlite3. >'PASSWORD': '', # Not used with sqlite3. >'HOST': '', # Set to empty string for > localhost. Not used with sqlite3. >'PORT': '', # Set to empty string for > default. Not used with sqlite3. >}, >'geodata': { >'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add > 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. >'NAME': 'mydatabase', # Or path to > database file if using sqlite3. >'USER': 'Username', # Not used with sqlite3. >'PASSWORD': 'Password', # Not used with sqlite3. >'HOST': '', # Set to empty string for > localhost. Not used with sqlite3. >'PORT': '', # Set to empty string for > default. Not used with sqlite3. > > } > } > > Now if I am doing a > $ Python manage.py syncdb --database=geodata > > I am getting a error like this : > django.db.utils.DatabaseError: Ordering can't span tables on > non-relational backends > > If however I am executing the above without postgres service started, > I will get a error related to Postgres. > If I am explicitly mentioning the RDMS why is it throwing me error > based on MongoDB? > > What am I missing here? Any pointers or documents will be of great help. > > > - > Regards > Subhodip Biswas > > > GPG key : FAEA34AB > Server : pgp.mit.edu > http://subhodipbiswas.wordpress.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Thanks, Subhranath Chunder. www.subhranath.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
[Error] Mixing Two databases
Hi all, I am trying to use two database for my django(Django nonrel 1.3.1) project. One is Postgres and other is MongoDB. After filling in details in settings.py : DATABASES = { 'default': { 'ENGINE': 'django_mongodb_engine', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'Mongo_MSTR', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. }, 'geodata': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'mydatabase', # Or path to database file if using sqlite3. 'USER': 'Username', # Not used with sqlite3. 'PASSWORD': 'Password', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } Now if I am doing a $ Python manage.py syncdb --database=geodata I am getting a error like this : django.db.utils.DatabaseError: Ordering can't span tables on non-relational backends If however I am executing the above without postgres service started, I will get a error related to Postgres. If I am explicitly mentioning the RDMS why is it throwing me error based on MongoDB? What am I missing here? Any pointers or documents will be of great help. - Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.