| author | ymh <ymh.work@gmail.com> |
| Fri, 22 Jan 2010 18:23:34 +0100 | |
| changeset 11 | f236caaceb43 |
| parent 0 | 0d40e90630ef |
| child 29 | cc9b7e14412b |
| permissions | -rw-r--r-- |
| 0 | 1 |
from django.core.management.base import AppCommand |
2 |
||
3 |
class Command(AppCommand): |
|
4 |
help = "Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for the given model module name(s)." |
|
5 |
||
6 |
output_transaction = True |
|
7 |
||
8 |
def handle_app(self, app, **options): |
|
9 |
from django.core.management.sql import sql_all |
|
10 |
return u'\n'.join(sql_all(app, self.style)).encode('utf-8') |