Re: Multiple Databases

2017-02-27 Thread ludovic coues
Have you checked your settings for typo ? 2017-02-27 10:02 GMT+01:00 Luvpreet Singh : > But dylan, I have written that > > Check1.objects.using('default').all() > > gives me error. > > On Mon, Feb 27, 2017 at 1:08 PM, Dylan Reinhold wrote: >> >> It is going to use the database named default. >> C

Re: Multiple Databases

2017-02-27 Thread Luvpreet Singh
But dylan, I have written that Check1.objects.using('default').all() gives me error. On Mon, Feb 27, 2017 at 1:08 PM, Dylan Reinhold wrote: > It is going to use the database named default. > Checkout the doc on using mutiple DBs > https://docs.djangoproject.com/en/1.10/topics/db/multi-db/ > >

Re: Multiple Databases

2017-02-26 Thread Dylan Reinhold
It is going to use the database named default. Checkout the doc on using mutiple DBs https://docs.djangoproject.com/en/1.10/topics/db/multi-db/ Dylan On Sun, Feb 26, 2017 at 11:17 PM, Luvpreet Singh wrote: > Hi everyone, > > I am using 2 databases in my django app. One is default sqlite and se

Re: multiple databases - two questions

2017-01-03 Thread Fred Stluka
Mike, Yeah.  Makes sense.  Good thought about the UUIDs!  My success was due partly to the fact that I could afford to move entire tables, not just selected rows, and could move all related tables as well. Trying to move just some of a related set of data f

Re: multiple databases - two questions

2017-01-02 Thread Mike Dewhirst
On 3/01/2017 12:32 PM, Fred Stluka wrote: Mike, Maybe you don't need a custom DB manager. Perhaps a simple DB router would suffice? It's a Django way to specify which DB to use based on which model is being used, whether it is being read/written, etc. That's the approach I took. The essence

Re: multiple databases - two questions

2017-01-02 Thread Fred Stluka
Mike, Maybe you don't need a custom DB manager.  Perhaps a simple DB router would suffice?  It's a Django way to specify which DB to use based on which model is being used, whether it is being read/written, etc. See: - https://docs.djangoproject.com/en

Re: Multiple databases in Django 1.7

2015-12-09 Thread Łukasz Pauszek
Hey, thank you for fast response. Yes, I'm aware that allow_migrate format from the one mentioned in link you provided because (as is mentioned in title) I'm using Django 1.7 and the code I provided is almost copy/paste of what you can find under the same link but for v. 1.7 Things I changed in

Re: Multiple databases in Django 1.7

2015-12-09 Thread learn django
Hi LP. Your allow_migrate function differs in the format from what is mentioned in the link below. https://docs.djangoproject.com/en/dev/topics/db/multi-db/#topics-db-multi-db-routing I have tried this last week and it works fine. On Wednesday, December 9, 2015 at 2:47:42 AM UTC-8, Łukasz Pausz

Re: Multiple databases

2015-05-19 Thread Galia Ladiray
It depends what you need, We use redis for non sql, and postgres for sql, You can use an id field to have a link between them. Django 1.8 has a support for postgres specific fields like HStore, maybe this is good enough for you? Galia On Tuesday, May 19, 2015 at 2:40:17 AM UTC+2, Roger Dunn wrot

Re: Multiple databases

2015-05-18 Thread Javier Guerra Giraldez
On Mon, May 18, 2015 at 7:35 PM, Roger Dunn wrote: > The use case is that the normalized data will be fetched often, is very > tabular in nature, and the additional data is more document centric and will > be fetch less often, by quite a margin. have you considered PostgreSql? it does handle js

Re: multiple databases and syncdb problem

2013-10-30 Thread Tom Evans
On Tue, Oct 29, 2013 at 9:35 PM, Simon Charette wrote: > syncdb defaults to syncing the 'default' database when no --database is > specified. > > Try specifying which database to synchronize, with the --database=inserv > flag in your case. > syncdb will only synch one DB at a time, and as Simon s

Re: multiple databases and syncdb problem

2013-10-29 Thread Simon Charette
syncdb defaults to syncing the 'default' database when no --database is specified . Try specifying which database to synchronize, with the --database=inserv flag in your case. Le mardi 29 octobre 2013 16:52:

Re: multiple databases [was]Trying to find something in multiple databases... Confused...

2012-06-18 Thread Kurtis Mullins
On Mon, Jun 18, 2012 at 1:45 PM, Dennis Lee Bieber wrote: > > > First, is everybody on the same page (terminology)... (Independent > of Django) > >First is: multiple database engines (SQLite3, MySQL, Access/JET, > etc.). Working across multiple engines is never easy -- one typically

Re: multiple databases [was]Trying to find something in multiple databases... Confused...

2012-06-18 Thread Kurtis Mullins
> > On Mon, Jun 18, 2012 at 9:30 AM, Daniel Roseman > wrote: There are certain "advanced" features of Django - multiple DBs, model > subclassing, that sort of thing I feel there's quite a few problems that would be relatively unsolvable without model subclassing. At least in any efficient way.

Re: multiple databases [was]Trying to find something in multiple databases... Confused...

2012-06-18 Thread Daniel Roseman
On Monday, 18 June 2012 13:16:55 UTC+1, lawgon wrote: > > On Mon, 2012-06-18 at 05:12 -0700, Daniel Roseman wrote: > > Multiple databases is a whole different > > question, which you really don't want to get into as a newbie (or, > > indeed, > > at all if possible). > > could you elaborate on

Re: multiple databases [was]Trying to find something in multiple databases... Confused...

2012-06-18 Thread kenneth gonsalves
On Mon, 2012-06-18 at 05:12 -0700, Daniel Roseman wrote: > Multiple databases is a whole different > question, which you really don't want to get into as a newbie (or, > indeed, > at all if possible). could you elaborate on this - I was thinking on getting into multiple databases and would appr

Re: Multiple Databases || External Databases

2011-07-18 Thread Lycan
Thank you both! On Jul 18, 1:39 pm, Andre Terra wrote: > Or maybe you want to authenticate using a remote resource? > > Authentication using > REMOTE_USERhttps://docs.djangoproject.com/en/dev/howto/auth-remote-user/ > > Cheers, > AT > > > > > > > > On Mon, Jul 18, 2011 at 6:08 AM, Uros Trebec w

Re: Multiple Databases || External Databases

2011-07-18 Thread Andre Terra
Or maybe you want to authenticate using a remote resource? Authentication using REMOTE_USER https://docs.djangoproject.com/en/dev/howto/auth-remote-user/ Cheers, AT On Mon, Jul 18, 2011 at 6:08 AM, Uros Trebec wrote: > > > On Jul 17, 10:36 pm, Lycan wrote: > > I am building a Django User pro

Re: Multiple Databases || External Databases

2011-07-18 Thread Uros Trebec
On Jul 17, 10:36 pm, Lycan wrote: > I am building a Django User profile management portal. In one of the > sections of the website i need pull data from an external database(Its > managed by someone else, i have access to it). > > How can i achieve this and also can someone please point me to a

Re: Multiple Databases

2011-07-05 Thread Venkatraman S
On Tue, Jul 5, 2011 at 6:39 PM, Nick wrote: > However, i also > need to support dynamic database creation - i.e. one or more databases > created from a single model (think of these as customer specific > databases). I will be using sqlite and want to save the path/ > connection details of the dyn

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
I submitted a patch to the admin change form template -- http://code.djangoproject.com/ticket/15931. Meanwhile, you can temporarily get around the problem on a per-application basis by adding the attached file to the application package directory at templates/admin//change_form.html. --D --

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread David Chandek-Stark
OK, that's good. However, I don't really understand why the admin site employs such an extremely convoluted method here. If you follow the logic from the change form, here's what happens: if has_absolute_url (i.e., the object model has a "get_absolute_url" attribute) ... -> display "view on

Re: Multiple databases - unmanaged models - get_absolute_url()

2011-04-29 Thread Ramiro Morales
On Fri, Apr 29, 2011 at 2:18 PM, David Chandek-Stark wrote: > [...] >  Now, I think the problem > is that this method uses the database for the contenttypes app instead of > the alternate database > (see http://code.djangoproject.com/browser/django/tags/releases/1.3/django/contrib/contenttypes/mo

Re: multiple databases -- database across sites?

2010-06-10 Thread Alex Robbins
Chris, The sites contrib app seems to address your use case. http://docs.djangoproject.com/en/dev/ref/contrib/sites/ You could just add a foreign key to site in the second app and modify the manager to only get items for the current site. class SiteSpecificManager(db.Manager): def get_query_se

Re: Multiple databases - syncdb

2010-02-03 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 11:02 PM, Klemens Mantzos wrote: > thx! > > syncdb is now calling the database router before actually syncing to > the db. but... > > ...stumbled upon a new problem: > > if i do > python manage.py syncdb --database=default > before i sync the users database this error comes

Re: Multiple databases - syncdb

2010-02-03 Thread kmpm
@klemens you are most definitely not alone. I made a router that would allow me to have one database per app and I get exactly the same type of error on both postgres and sqlite. Doing syncdb on the default db work as it should but when I in this case do a ./manage.py syncdb --database=ads I get th

Re: Multiple databases - syncdb

2010-02-03 Thread Klemens Mantzos
thx! syncdb is now calling the database router before actually syncing to the db. but... ...stumbled upon a new problem: if i do python manage.py syncdb --database=default before i sync the users database this error comes up (which seems ok to me): django.db.utils.DatabaseError: (1146, "Table 'm

Re: Multiple databases - syncdb

2010-02-03 Thread Russell Keith-Magee
On Mon, Feb 1, 2010 at 11:07 PM, Klemens Mantzos wrote: > hi list, > > checked out the new multidb feature > (http://docs.djangoproject.com/en/dev/topics/db/multi-db/). > > i assumed that syncdb would only sync those models in the database > when calling allow_syncdb() of the database routers retu

Re: Multiple Databases support in 1.2

2010-01-07 Thread Keith Fernie
On 07/01/10 10:51, cschand wrote: How we can create tables for the databases other than default? I have two databases and the settings are DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'dbtest1', 'USER': 'root', 'PASSWORD': 'pass

Re: Multiple Databases support in 1.2

2010-01-07 Thread cschand
Thanks Russ On Jan 7, 4:20 pm, Russell Keith-Magee wrote: > On Thu, Jan 7, 2010 at 6:51 PM, cschand wrote: > > When I run syncdb command it creates tables for default (dbtest1 > > database) only. How can I create tables for db2? Is it possible to > > create at runtime? > > syncdb (and all the ot

Re: Multiple Databases support in 1.2

2010-01-07 Thread Russell Keith-Magee
On Thu, Jan 7, 2010 at 6:51 PM, cschand wrote: > When I run syncdb command it creates tables for default (dbtest1 > database) only. How can I create tables for db2? Is it possible to > create at runtime? syncdb (and all the other database-related management commands) now takes a --database argume

Re: Multiple databases/engines

2009-04-06 Thread Malcolm Tredinnick
On Mon, 2009-04-06 at 21:22 -0300, Marcello Parra wrote: > Hello, > > I started to play with Django some weeks ago. I'm very impressed with > it and making some tests with an application I have already running... > > The problem is that I need to connect to two databases using two > different en

Re: Multiple Databases Revisited (Interim)

2009-02-17 Thread Malcolm Tredinnick
On Tue, 2009-02-17 at 03:26 -0800, proteus...@gmail.com wrote: > I've been following the discussion about supporting multiple > databases within one project (primarily on a per-app or per-model > basis) with interest and look forward to the feature getting > solidified and implemented into the tr

Re: Multiple Databases Revisited (Interim)

2009-02-17 Thread Alex Gaynor
On Tue, Feb 17, 2009 at 6:26 AM, proteus...@gmail.com wrote: > >I've been following the discussion about supporting multiple > databases within one project (primarily on a per-app or per-model > basis) with interest and look forward to the feature getting > solidified and implemented into the

Re: multiple databases

2007-06-27 Thread benf
Hi Guys, I'm in the middle of the latest set of updates (the merge of the oracle branch with trunk), the only thing left to do is sort out the core.management module (68 conflicts!!). I should have that cracked by the end of today and it would be great to get it checked in so others could help wit

Re: multiple databases

2007-06-26 Thread Jacob Kaplan-Moss
On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ben Ford is working on merging in changes from the trunk in with the > branch... at this time neither he or myself ( I had planned on doing > this but found he was farther ahead of me ) have commit permissions to > the project... but hopef

Re: multiple databases

2007-06-25 Thread [EMAIL PROTECTED]
Ben Ford is working on merging in changes from the trunk in with the branch... at this time neither he or myself ( I had planned on doing this but found he was farther ahead of me ) have commit permissions to the project... but hopefully if he gets finished with it..and we can test it out... someo

Re: multiple databases

2007-06-25 Thread Jeremy Dunck
On 6/25/07, grassoalvaro <[EMAIL PROTECTED]> wrote: > > Anyone? That was greate idea but i see that last update was long time > ago... i need multiple databases in my project so if anyone know > anything about this (maybe own solutions in this area?) please inform > me. > No one is working on it

Re: multiple databases

2007-06-25 Thread grassoalvaro
Anyone? That was greate idea but i see that last update was long time ago... i need multiple databases in my project so if anyone know anything about this (maybe own solutions in this area?) please inform me. On Jun 24, 6:14 pm, grassoalvaro <[EMAIL PROTECTED]> wrote: > Is that project dead or ma