Ticket #1440: management.diff
File management.diff, 1.1 KB (added by , 19 years ago) |
---|
-
django/core/management.py
424 424 created_models.add(model) 425 425 pending_references.update(references) 426 426 sql.extend(_get_sql_for_pending_references(model, pending_references)) 427 sql = "\n".join(sql)428 427 print "Creating table %s" % model._meta.db_table 429 cursor.execute(sql) 428 for statement in sql: 429 cursor.execute(statement) 430 430 431 431 for model in model_list: 432 432 if model in created_models: 433 433 sql = _get_many_to_many_sql_for_model(model) 434 434 if sql: 435 sql = '\n'.join(sql).strip()436 435 print "Creating many-to-many tables for %s model" % model.__name__ 437 cursor.execute(sql) 436 for statement in sql: 437 cursor.execute(statement) 438 438 439 439 transaction.commit_unless_managed() 440 440 syncdb.args = ''