2012-08-28 22:56:32 +02:00
|
|
|
from django.core.management.base import NoArgsCommand
|
2012-10-29 19:43:00 +01:00
|
|
|
from zephyr.models import clear_database
|
2012-08-28 22:56:32 +02:00
|
|
|
|
|
|
|
class Command(NoArgsCommand):
|
2012-10-03 21:05:48 +02:00
|
|
|
help = "Clear only tables we change: messages, accounts + sessions"
|
2012-08-28 22:56:32 +02:00
|
|
|
|
|
|
|
def handle_noargs(self, **options):
|
2012-10-29 19:43:00 +01:00
|
|
|
clear_database()
|
2012-08-28 22:56:32 +02:00
|
|
|
self.stdout.write("Successfully cleared the database.\n")
|