app/django/core/management/commands/sqlall.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Mon, 09 Feb 2009 16:17:25 +0000
changeset 1259 e7ae623d7b8e
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Reset the RELEASE_TAG to None (unreleased) now that the 0.2-20090209 release candidate branch has been created. Patch by: Pawel Solyga

from django.core.management.base import AppCommand

class Command(AppCommand):
    help = "Prints the CREATE TABLE, custom SQL and 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_all
        return u'\n'.join(sql_all(app, self.style)).encode('utf-8')