Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 21, 2005 20:19:29

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2nd database for a specific app


i have django installed on dreamhost. now i´d like to build an app with
tables from a given database on another host, still using my
dreamhost-installation.
since the database-settings seem to be global (settings.py) for all apps,
i´m not quite sure how to do this.

patrick

Offline

#2 Nov. 21, 2005 20:43:52

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2nd database for a specific app


On 11/21/05, patrick k <> wrote:
> i have django installed on dreamhost. now i´d like to build an app with
> tables from a given database on another host, still using my
> dreamhost-installation.
> since the database-settings seem to be global (settings.py) for all apps,
> i´m not quite sure how to do this.

Hey Patrick,

Feel free to create a separate settings file for separate
installations. Just point to the appropriate settings file in your
server arrangement.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

#3 Nov. 21, 2005 20:54:42

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2nd database for a specific app


sorry for being stupid here, but do you mean something like this:
django-admin.py startapp mynewapp --settings=myproject.newappsetings

can i set the 2nd settings-file with DJANGO_SETTINGS_MODULE?

>
> On 11/21/05, patrick k <> wrote:
>> i have django installed on dreamhost. now i´d like to build an app with
>> tables from a given database on another host, still using my
>> dreamhost-installation.
>> since the database-settings seem to be global (settings.py) for all apps,
>> i´m not quite sure how to do this.
>
> Hey Patrick,
>
> Feel free to create a separate settings file for separate
> installations. Just point to the appropriate settings file in your
> server arrangement.
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com | chicagocrime.org

Offline

#4 Nov. 22, 2005 09:23:35

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2nd database for a specific app


please help:
i´m trying to have just ONE table for my app on a different host. all the
other tables should be on dreamhost (auth, packages ...). so, when trying to
install my newapp, i get an error like "table .packages not found". i
basically need 2 setting files for one project (if that works).

is it really possible to have different setting-files for different APPS
(not projects)?


>
> sorry for being stupid here, but do you mean something like this:
> django-admin.py startapp mynewapp --settings=myproject.newappsetings
>
> can i set the 2nd settings-file with DJANGO_SETTINGS_MODULE?
>
>>
>> On 11/21/05, patrick k <> wrote:
>>> i have django installed on dreamhost. now i´d like to build an app with
>>> tables from a given database on another host, still using my
>>> dreamhost-installation.
>>> since the database-settings seem to be global (settings.py) for all apps,
>>> i´m not quite sure how to do this.
>>
>> Hey Patrick,
>>
>> Feel free to create a separate settings file for separate
>> installations. Just point to the appropriate settings file in your
>> server arrangement.
>>
>> Adrian
>>
>> --
>> Adrian Holovaty
>> holovaty.com | djangoproject.com | chicagocrime.org
>

Offline

#5 Nov. 22, 2005 10:15:57

Ian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

2nd database for a specific app


Hi Patrick.

At the moment Django can not talk to 2 different databases.
If you need this, you might be able to get the data out of the 2nd
database via custom functions
which handle the db calls directly, or possibly futz with django/core/db

regards
Ian

but I would wait 12-24 hours until the experts wake up ;-)


On 11/22/05, patrick k <> wrote:
>
> please help:
> i´m trying to have just ONE table for my app on a different host. all the
> other tables should be on dreamhost (auth, packages ...). so, when trying to
> install my newapp, i get an error like "table .packages not found". i
> basically need 2 setting files for one project (if that works).
>
> is it really possible to have different setting-files for different APPS
> (not projects)?
>
>
> >
> > sorry for being stupid here, but do you mean something like this:
> > django-admin.py startapp mynewapp --settings=myproject.newappsetings
> >
> > can i set the 2nd settings-file with DJANGO_SETTINGS_MODULE?
> >
> >>
> >> On 11/21/05, patrick k <> wrote:
> >>> i have django installed on dreamhost. now i´d like to build an app with
> >>> tables from a given database on another host, still using my
> >>> dreamhost-installation.
> >>> since the database-settings seem to be global (settings.py) for all apps,
> >>> i´m not quite sure how to do this.
> >>
> >> Hey Patrick,
> >>
> >> Feel free to create a separate settings file for separate
> >> installations. Just point to the appropriate settings file in your
> >> server arrangement.
> >>
> >> Adrian
> >>
> >> --
> >> Adrian Holovaty
> >> holovaty.com | djangoproject.com | chicagocrime.org
> >
>
>


--
-- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti

Offline

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support