2013-04-23 18:51:17 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2012-08-28 22:56:32 +02:00
|
|
|
from django.core.management.base import NoArgsCommand
|
2013-07-29 23:03:31 +02:00
|
|
|
from zerver.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")
|