Ticket #2932: reset.diff

File reset.diff, 957 bytes (added by pb@…, 9 years ago)

management.py patch

  • django/core/management.py

     
    627627def reset(app, interactive=True):
    628628    "Executes the equivalent of 'get_sql_reset' in the current database."
    629629    from django.db import connection, transaction
     630    from django.conf import settings
    630631    app_name = app.__name__.split('.')[-2]
    631632
    632633    disable_termcolors()
     
    638639    if interactive:
    639640        confirm = raw_input("""
    640641You have requested a database reset.
    641 This will IRREVERSIBLY DESTROY any data in your database.
     642This will IRREVERSIBLY DESTROY any data for
     643the "%s" application in the database "%s".
    642644Are you sure you want to do this?
    643645
    644 Type 'yes' to continue, or 'no' to cancel: """)
     646Type 'yes' to continue, or 'no' to cancel: """ % (app_name, settings.DATABASE_NAME))
    645647    else:
    646648        confirm = 'yes'
Back to Top