Files
zulip/zephyr/management/commands/clear_db.py
Tim Abbott 6c39bf5cbd Cut out duplicated code between clear_database and populate_db.
(imported from commit 4bb44c20d2f0477d8a3db72788f82b0cf8572b2d)
2012-10-29 14:54:18 -04:00

10 lines
330 B
Python

from django.core.management.base import NoArgsCommand
from zephyr.models import clear_database
class Command(NoArgsCommand):
help = "Clear only tables we change: messages, accounts + sessions"
def handle_noargs(self, **options):
clear_database()
self.stdout.write("Successfully cleared the database.\n")