I use this script to reset the database and then load some test data. from django.db import connection from django.core import management from django.contrib.auth.create_superuser import createsuperuser cursor = connection.cursor() cursor.execute("select tablename from pg_tables where schemaname='public'") tables = cursor.fetchall() for table in tables: cursor.execute('drop table "%s" cascade' % table[0]) management.syncdb() createsuperuser('root','[EMAIL PROTECTED]','secret')
But for the last command to work I had to comment the line dispatcher.connect(create_superuser ... in file contrib.auth.management otherwise I had to create the superuser in the console every time (someone knows a better way to do it?). pvl --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---