I'm developing a django application with some complicated user interactions, so I need to do a lot of testing. Is there an easy way to clear out the Users table (and all associated tables) in the database to start fresh? Also, is there a good way to autopopulate the database with "test users" to play around with?
Details:
Thanks!
for auto-populating, have a look at django fixtures
loading fixtures will overwrite changes, but not delete any additions. to clear the table, you want
User.objects.all().delete()
This will also propage to anything with foreign keys referring to users. To do this from the command line, wrap this in a management command