Re: how to change database within Django.

2009-04-30 Thread peter

Hi,
  We have a database for each product that we have.  Within the
database, there are product specific tables.  The current setup uses
PHP/MySQL and the front end is a simple form that a user can use to
select which product they want to do a search on, follow by a serial
number.  I'm _very_ surprised that Django can't switch databases to do
simple queries.  I have gone and digged around this group and found
this thread.

http://groups.google.com/group/django-developers/browse_thread/thread/9f0353fe0682b73

Frankly, this is a little to much hassle for my taste...if there isn't
an easier way to do this, then I will have to think of another
framework alternative...perhaps RoR.

-peter

On Apr 30, 12:54 pm, Daniel Roseman 
wrote:
> On Apr 30, 6:45 pm, peter  wrote:
>
> > Hello,
> >   I'm an newbie so please bear with me.
>
> >   I have a simple form that a user can select the from different
> > product line (databases) and search based on serial number.  From what
> > I have read, the database name needs to be specified within Django,
> > which in this case is a dynamic variable.  How can I get around this
> > dealing with multiple database search problem?
>
> > Thanks,
> > -Peter
>
> Django can't currently switch between databases - there is a Summer of
> Code project this year to make it possible - but I wonder if you
> really need it.
>
> I suspect you are confused about what a database consists of. A
> database is a collection of tables, and individual databases are
> usually quite separate from one another. While I don't know the
> details of your setup, it seems unlikely that you would have multiple
> databases for different product lines - in fact I wouldn't even have
> separate sets of tables, the best way would be to have one table
> containing the product line codes and one with the individual
> products, with a foreign key to the product lines table.
>
> Can you give more details of your setup - is this a legacy database?
> --
> DR.
--~--~-~--~~~---~--~~
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: how to change database within Django.

2009-04-30 Thread Daniel Roseman

On Apr 30, 6:45 pm, peter  wrote:
> Hello,
>   I'm an newbie so please bear with me.
>
>   I have a simple form that a user can select the from different
> product line (databases) and search based on serial number.  From what
> I have read, the database name needs to be specified within Django,
> which in this case is a dynamic variable.  How can I get around this
> dealing with multiple database search problem?
>
> Thanks,
> -Peter


Django can't currently switch between databases - there is a Summer of
Code project this year to make it possible - but I wonder if you
really need it.

I suspect you are confused about what a database consists of. A
database is a collection of tables, and individual databases are
usually quite separate from one another. While I don't know the
details of your setup, it seems unlikely that you would have multiple
databases for different product lines - in fact I wouldn't even have
separate sets of tables, the best way would be to have one table
containing the product line codes and one with the individual
products, with a foreign key to the product lines table.

Can you give more details of your setup - is this a legacy database?
--
DR.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



how to change database within Django.

2009-04-30 Thread peter

Hello,
  I'm an newbie so please bear with me.

  I have a simple form that a user can select the from different
product line (databases) and search based on serial number.  From what
I have read, the database name needs to be specified within Django,
which in this case is a dynamic variable.  How can I get around this
dealing with multiple database search problem?

Thanks,
-Peter


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---