diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-09 03:35:02 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-09 03:35:02 +0000 |
| commit | b4dd4d4bb7db6533e13be1455ccdc52c3d50cac3 (patch) | |
| tree | 8db98c18415f071584c8f59369872f4fb6b35925 /django/core | |
| parent | 98710a5a2853594f5bad161f9a3bedd27171bb89 (diff) | |
Fixed #3163 -- Add a "Meta.managed" option to models.
This allows a model to be defined which is not subject to database table
creation and removal. Useful for models that sit over existing tables or
database views.
Thanks to Alexander Myodov, Wolfgang Kriesing and Ryan Kelly for the bulk of
this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/management/commands/syncdb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/syncdb.py b/django/core/management/commands/syncdb.py index a41fd5725b..dbef7a6a95 100644 --- a/django/core/management/commands/syncdb.py +++ b/django/core/management/commands/syncdb.py @@ -71,7 +71,7 @@ class Command(NoArgsCommand): if refto in seen_models: sql.extend(connection.creation.sql_for_pending_references(refto, self.style, pending_references)) sql.extend(connection.creation.sql_for_pending_references(model, self.style, pending_references)) - if verbosity >= 1: + if verbosity >= 1 and sql: print "Creating table %s" % model._meta.db_table for statement in sql: cursor.execute(statement) |
