F
F
forgotten2012-02-25 15:15:04
Django
forgotten, 2012-02-25 15:15:04

Dynamic database creation in Django?

Django supports specifying a database when working with models:
docs.djangoproject.com/en/1.3/topics/db/multi-db/
But what if I want to create a new database directly from the application, synchronize it and save data to it ? Let's say that I create my own database for each client - why don't I keep the full list of databases in settings.py?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lorien, 2012-02-25
@lorien

Perhaps you should abandon django and use sqlalchemy for example. Well, or take out the database config in a separate py-file, change it with a script and then do a website restart.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question