Commits

David Jean Louis  committed 22781d5 Merge

Merged in barseghyanartur/django-admin-tools (pull request #32)

Add a management command to remove the dashboard preferences

  • Participants
  • Parent commits df164cc, 7587d13

Comments (0)

Files changed (1)

File admin_tools/dashboard/management/commands/clear_dashboard_preferences.py

+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()