From 9957759b4b674c813c07e87e25f79e559208706a Mon Sep 17 00:00:00 2001 From: Artur Barseghyan Date: Tue, 29 Jul 2014 01:32:35 +0200 Subject: [PATCH] add management command to remove the dashboard preferences --- .../management/commands/clear_dashboard_preferences.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 admin_tools/dashboard/management/commands/clear_dashboard_preferences.py diff --git a/admin_tools/dashboard/management/commands/clear_dashboard_preferences.py b/admin_tools/dashboard/management/commands/clear_dashboard_preferences.py new file mode 100644 index 0000000..572ef72 --- /dev/null +++ b/admin_tools/dashboard/management/commands/clear_dashboard_preferences.py @@ -0,0 +1,8 @@ +from django.core.management import BaseCommand + +from admin_tools.dashboard.models import DashboardPreferences + +class Command(BaseCommand): + help = """Clears dashboard preferences.""" + def handle(self, *args, **options): + DashboardPreferences._default_manager.all().delete()