Have different databases using SQLite

17 views
Skip to first unread message

Lars Ruoff

unread,
Oct 6, 2011, 3:37:45 PM10/6/11
to Django users
Hi,

i'm having the Django database set up like so:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'D:\Users\Max\Projects\my4x\data\my4x.db',
'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.
}
}

I see that the database contains a lot of Django-related stuff (tables
with auth_ and django_ prefixes).
Is there a way i can seperate the Django stuff from my apps model
database?
What I'd prefer is to have two different databases (files), with one
containing the Django stuff and the other my own models.
Reason is that i develop a game and the database stores the game state
for a given time step. Ideally, i would like to have a different game
database file for each time step so i can go back in time when i like.

Tom Evans

unread,
Oct 7, 2011, 7:52:05 AM10/7/11
to django...@googlegroups.com

Django will happily support multiple databases, see the docs for the caveats.

https://docs.djangoproject.com/en/1.3/topics/db/multi-db/

Cheers

Tom

Lars Ruoff

unread,
Oct 7, 2011, 3:48:31 PM10/7/11
to django...@googlegroups.com
Many thanks, Tom!
Didn't notice this was covered in the docs.

Reply all
Reply to author
Forward
0 new messages