web/lib/django/core/management/commands/sqlindexes.py
author ymh <ymh.work@gmail.com>
Fri, 29 Jan 2010 05:14:15 +0100
changeset 17 dc40652282ad
parent 0 0d40e90630ef
child 29 cc9b7e14412b
permissions -rw-r--r--
Added tag V00.06 for changeset 146d86480e85

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')