diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-10-24 22:21:55 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-10-24 22:21:55 +0000 |
| commit | 3536f891087a98dbb7b449b30e109e9ba5a4e2e1 (patch) | |
| tree | 71e59af7550f7579eaaaccf4230ec4f1cd3156d2 | |
| parent | 60b46d72ac81dc5a54b4eaa8ccf1159f83666aa9 (diff) | |
Fixed #2932 -- Added more details to the warning message in 'manage.py reset'. Thanks for the patch, pb@e-scribe.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/django/core/management.py b/django/core/management.py index 5e709db6ac..75b79f1565 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -540,7 +540,7 @@ def syncdb(verbosity=1, interactive=True): transaction.rollback_unless_managed() else: transaction.commit_unless_managed() - + syncdb.args = '' def get_admin_index(app): @@ -627,6 +627,7 @@ install.args = APP_ARGS def reset(app, interactive=True): "Executes the equivalent of 'get_sql_reset' in the current database." from django.db import connection, transaction + from django.conf import settings app_name = app.__name__.split('.')[-2] disable_termcolors() @@ -638,13 +639,14 @@ def reset(app, interactive=True): if interactive: confirm = raw_input(""" You have requested a database reset. -This will IRREVERSIBLY DESTROY any data in your database. +This will IRREVERSIBLY DESTROY any data for +the "%s" application in the database "%s". Are you sure you want to do this? -Type 'yes' to continue, or 'no' to cancel: """) +Type 'yes' to continue, or 'no' to cancel: """ % (app_name, settings.DATABASE_NAME)) else: confirm = 'yes' - + if confirm == 'yes': try: cursor = connection.cursor() |
