Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread Andre Terra
You can't map python processes to users. It's simply not how it works. This is the web on the 21st century, rethink your concepts instead of trying to fit them on to a completely different paradigm. Change is good. Embrace it. Cheers, AT On 8/18/11, michael kapelko wrote: > I think about 50

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread michael kapelko
I think about 50 users, but Django for each sounds too much. -- 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

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread Gelonida N
How many different users are connected at the same time? Would it be feasable to start one django prcoess for each connected user? On 08/18/2011 11:55 AM, michael kapelko wrote: > I think I have to emulate Delphi app with a server process, and make > Django interact with the process. The process

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread Fabrizio Mancini
On 18 August 2011 11:55, michael kapelko wrote: > I think I have to emulate Delphi app with a server process, and make > Django interact with the process. The process can login to DB > directly. That's not so easy, but I guess that's the only option here > - move Delphi app from client machine to

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread michael kapelko
I think I have to emulate Delphi app with a server process, and make Django interact with the process. The process can login to DB directly. That's not so easy, but I guess that's the only option here - move Delphi app from client machine to server one. -- You received this message because you ar

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread bruno desthuilliers
On 18 août, 08:15, Jirka Vejrazka wrote: > I can't see how you could change Django easily. You could experiment > with creating settings dynamically and closing DB connection just > before user logs in (Django can open it again when it needs it) to use > your "dynamic" DB connection, The connecti

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-18 Thread Kejun He
hi, I had a same problem as you before, and I spent much of time on it, but could not get it goal. And the DATAVASES in settings.py is loaded when the server running. If you can let the project reload the settings, you may resolve the problem. Or you can use MySQLdb to do it. Sometimes we can

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread Jirka Vejrazka
> I.e. I want to set up database connection after Django app has started > *when I want it*. > Is there a way to do it? No. At least not easily. Django is a web framework and is expected to run on a web/application server with a single-user connection to a target database. That's typical for web a

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread michael kapelko
I.e. I want to set up database connection after Django app has started *when I want it*. Is there a way to do it? -- 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

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread michael kapelko
Delphi application works with server based scripts over TCP. It can be replaced with web interface. I don't have several databases, I will use single one, it's username/password that I want to use for everything Django does. So essentially I want to only change 'USER', 'PASSWORD' in settings.py af

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread Mike Dewhirst
On 18/08/2011 11:23am, michael kapelko wrote: I don't think the OP want to select which db is used, but to connect to the db with the logged in user's credentials. Exactly. DB authentication and user authentication are separate things. Users authenticate against Django. Full stop. Django> ac

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread michael kapelko
> I don't think the OP want to select which db is used, but to connect > to the db with the logged in user's credentials. Exactly. > DB authentication and user authentication are separate things. Users > authenticate against Django. Full stop. Django > accesses the database using > login data yo

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread Andre Terra
DB authentication and user authentication are separate things. Users authenticate against Django. Full stop. Django accesses the database using login data you provide on settings.py. If you're talking about permissions, Django ships with a permission module. You can define custom permissions on yo

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread bruno desthuilliers
On 17 août, 18:37, Tom Evans wrote: > On Wed, Aug 17, 2011 at 5:27 PM, michael kapelko wrote: > > Still, how do i make all my models use the connection info logged in > > user provided? > > You can't, or at least not with stock django. The term you are looking > for is 'multi tenancy', where by t

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread Tom Evans
On Wed, Aug 17, 2011 at 5:27 PM, michael kapelko wrote: > Still, how do i make all my models use the connection info logged in > user provided? > You can't, or at least not with stock django. The term you are looking for is 'multi tenancy', where by the database used is dependent upon the user wh

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread michael kapelko
Still, how do i make all my models use the connection info logged in user provided? -- 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

Re: How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread Shawn Milochik
It's just Python. Use the sqlite3 module or psycopg2 (or whatever's appropriate) and use your databases as you like. There's nothing stopping you from using any tables in whatever database Django's models are using, or any other databases of any kind from within your Python code. There's no

How do I select which user/password to use for DB connection after Django app was started?

2011-08-17 Thread michael kapelko
Hi. I want to have a login form, and connect to DB with the provided username/password. Django's settings.py specifies username/password/DB to use for the whole Django app. I want to defer the DB connection when a user actually logins, not when Django starts up. Is there a way to do it? Thanks. --