summaryrefslogtreecommitdiffstats
path: root/webapp/django/core/management/commands/sqlreset.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/django/core/management/commands/sqlreset.py')
-rw-r--r--webapp/django/core/management/commands/sqlreset.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/webapp/django/core/management/commands/sqlreset.py b/webapp/django/core/management/commands/sqlreset.py
new file mode 100644
index 0000000000..ec40848c42
--- /dev/null
+++ b/webapp/django/core/management/commands/sqlreset.py
@@ -0,0 +1,10 @@
+from django.core.management.base import AppCommand
+
+class Command(AppCommand):
+ help = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)."
+
+ output_transaction = True
+
+ def handle_app(self, app, **options):
+ from django.core.management.sql import sql_reset
+ return u'\n'.join(sql_reset(app, self.style)).encode('utf-8')