views:

37

answers:

2

I would like to dynamically change path to sqlite database depending on currently logged user using Django framework. Basically each user should have his own sqlite database file. Anyone with experience? Thanks.

A: 

Django does not deal well with the database parameters changing like this. If you want to implement something like this then you should examine one of the other Python web frameworks that will allow you finer control over the database parameters.

Ignacio Vazquez-Abrams
A: 

Since Release 1.2 Django is able to deal with multiple db

my_object.save(using='a_databse')

Anyway, I'm not shure if it is a good idea to have a DB for every user (if there are a large and rasing amount of user...). What's the reason for your decision?

maersu
My reason is scalability. Stored data are always private for each user. I am also testing noSQL solutions for its elasticity and redundancy, but I will need some RMDB flexibility over metadata.
sstevko