              "because you haven't specified the DATABASE_ENGINE setting.\n" +
              "Edit your settings file and change DATABASE_ENGINE to something like 'postgresql' or 'mysql'.\n"))
          sys.exit(1)
  
      # Get installed models, so we generate REFERENCES right
      final_output = []
      known_models = set(_get_installed_models(_get_table_list()))
      pending_references = {}
  
      app_models = models.get_models(app)
 
</s> remove     known_models = set(_get_installed_models(_get_table_list()))
 </s> add     known_models = set([model for model in _get_installed_models(_get_table_list()) if model not in app_models]) </s> remove         final_output.append('-- The following references should be added but depend on non-existant tables:')
 </s> add         alter_sql = [] </s> remove     app_models = models.get_models(app)
 </s> add  </s> remove             final_output.extend(['-- ' + sql for sql in
 </s> add             alter_sql.extend(['-- ' + sql for sql in
    # Get installed models, so we generate REFERENCES right.
    # We trim models from the current app so that the sqlreset command does not
    # generate invalid SQL (leaving models out of known_models is harmless, so
    # we can be conservative).
    app_models = models.get_models(app)
              "because you haven't specified the DATABASE_ENGINE setting.\n" +
              "Edit your settings file and change DATABASE_ENGINE to something like 'postgresql' or 'mysql'.\n"))
          sys.exit(1)
  
    # Get installed models, so we generate REFERENCES right.
    # We trim models from the current app so that the sqlreset command does not
    # generate invalid SQL (leaving models out of known_models is harmless, so
    # we can be conservative).
    app_models = models.get_models(app)
      final_output = []
      known_models = set(_get_installed_models(_get_table_list()))
      pending_references = {}
  
      app_models = models.get_models(app)
keep keep keep keep replace keep keep keep keep keep
 Fixed #2260 -- fixed a problem where some foreign key references were being
omitted during a "reset" or "sqlreset". Thanks, marcink@elksoft.pl.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3542 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/core/management.py