Django 1.2
I have the following setup:
ProjectA
settings.py:
...
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'test_database', # Or path to
database file if using sqlite3.
'USER': 'user', # Not used with sqlite3.
'PASSWORD': 'password', # Not used with
sqlite3.
'HOST': '127.0.0.1', # Set to empty
string for localhost. Not used with sqlite3.
'PORT': '3306', # Set to empty string for
default. Not used with sqlite3.
}
}
...
now in the mysql database server the following databases exist:
test_database
Books
People
Under ProjectA director the following applications exist:
Books
People
What I would like to do is create the models within those applications
(Books/People) to write their sql tables to the appropriate database
within my one mysql database server.
eg: I want the create table on Books to be:
create table Books.author ...
Any thoughts?
On Jun 16, 12:40 pm, Nick <[email protected]> wrote:
> Which version of django are you working with?
>
> On Jun 16, 2:28 pm, thusjanthan <[email protected]> wrote:
>
>
>
> > Hi,
>
> > when I mean database I mean the separate databases from within one
> > mysql database server. So ex:
>
> > DB server: server.example.com
> > Databases that are contained in the one instance of mysql:
> > People
> > Books
>
> > I have made the connection in the settings.py at the project level but
> > in the individual applications suppose People I would like to create
> > the models that write the tables in that database space and the
> > application Books to write its models in the Books database. This
> > should be possible to do but not sure why its not working.
>
> > Any thoughts?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.