web/lib/django/core/management/commands/sqlindexes.py
changeset 0 0d40e90630ef
child 29 cc9b7e14412b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/lib/django/core/management/commands/sqlindexes.py	Wed Jan 20 00:34:04 2010 +0100
@@ -0,0 +1,10 @@
+from django.core.management.base import AppCommand
+
+class Command(AppCommand):
+    help = "Prints the CREATE INDEX SQL statements for the given model module name(s)."
+
+    output_transaction = True
+
+    def handle_app(self, app, **options):
+        from django.core.management.sql import sql_indexes
+        return u'\n'.join(sql_indexes(app, self.style)).encode('utf-8')