summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Jean Louis <izimobil@gmail.com>2014-08-11 15:01:04 (GMT)
committerDavid Jean Louis <izimobil@gmail.com>2014-08-11 15:01:04 (GMT)
commitfab0706ba4429e282fbb39796cfe8dadafb0778f (patch)
tree4a2dc7f03ae269a7f2fd61fe1e361ec2ad2bcdc4
parentbff8bcf1bda837f20b3164ff45a3b00bf2740cbc (diff)
parent9957759b4b674c813c07e87e25f79e559208706a (diff)
downloaddjango-admin-tools-fab0706ba4429e282fbb39796cfe8dadafb0778f.zip
django-admin-tools-fab0706ba4429e282fbb39796cfe8dadafb0778f.tar.gz
django-admin-tools-fab0706ba4429e282fbb39796cfe8dadafb0778f.tar.bz2
Merged in barseghyanartur/django-admin-tools (pull request #32)
Add a 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()