Django

Code

Changeset 9535

Show
Ignore:
Timestamp:
11/29/08 05:51:41 (1 month ago)
Author:
russellm
Message:

Fixed #9717 -- Corrected a problem where django-admin.py flush would attempt to flush database tables that had not yet been created. This occurred when an application had been added to INSTALLED_APPS, but had not yet been synchronized. Thanks to Julien Phalip for the patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management/sql.py

    r8401 r9535  
    120120    """ 
    121121    Returns a list of the SQL statements used to flush the database. 
    122      
     122 
    123123    If only_django is True, then only table names that have associated Django 
    124124    models and are in INSTALLED_APPS will be included. 
     
    126126    from django.db import connection 
    127127    if only_django: 
    128         tables = connection.introspection.django_table_names(
     128        tables = connection.introspection.django_table_names(only_existing=True
    129129    else: 
    130130        tables = connection.introspection.table_names()