title: In django, how do I call the subcommand 'syncdb' from the initialization script?
body: <p>I'm new to python and django, and when following the <a href="http://www.djangobook.com/en/1.0/chapter05/" rel="noreferrer">Django Book</a> I learned about the command 'python manage.py syncdb' which generated database tables for me. In development environment I use sqlite in memory database, so it is automatically erased everytime I restart the server. So how do I script this 'syncdb' command?(Should that be done inside the 'settings.py' file?)</p>
  
  <p><strong>CLARIFICATION</strong></p>
  
  <p>The OP is using an in-memory database, which needs to be initialized at the start of any process working with Django models defined against that database.  What is the best way to ensure that the database is initialized (once per process start).  This would be for running tests, or running a server, either via <code>manage.py runserver</code> or via a webserver process (such as with WSGI or mod_python).</p>