summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Barseghyan <artur.barseghyan@gmail.com>2014-07-28 23:32:35 (GMT)
committerArtur Barseghyan <artur.barseghyan@gmail.com>2014-07-28 23:32:35 (GMT)
commit9957759b4b674c813c07e87e25f79e559208706a (patch)
treed07835b3cbd8c5767183301007a08adc4d243aea
parentb350755fe26ee6a26adc06bfe81b63ae1d7850d8 (diff)
downloaddjango-admin-tools-9957759b4b674c813c07e87e25f79e559208706a.zip
django-admin-tools-9957759b4b674c813c07e87e25f79e559208706a.tar.gz
django-admin-tools-9957759b4b674c813c07e87e25f79e559208706a.tar.bz2
add management command to remove the dashboard preferences
-rw-r--r--admin_tools/dashboard/management/commands/clear_dashboard_preferences.py8
1 files changed, 8 insertions, 0 deletions
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()