views:

158

answers:

2

Is there an easy way to reset a django database (i.e. drop all data/tables, create new tables and create indexes) without loading fixture data afterwords? What I want to have is just an empty database because all data is loaded from another source (a kind of a post-processed backup).

I know that this could be achieved by piping the output of the manage sql... commands to manage dbshell, but this relies on manage dbshelland is kind of hacky...

Are there any other ways to do this?

Edit: manage reset will do it, but is there a command like reset that doesn't need the application names as parameters?

+2  A: 

shouldn't you be able do do this with manage.py's reset option?

Albert Visser
+2  A: 

As far as I know, the fixtures (in initial_data file) are automatically loaded after manage.py syndcb and not after reset. So, if you do a manage.py reset yourapp it should not load the fixtures. Hmm?

shylent