Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2932 -- Added more details to the warning message in 'manage.p…

…y 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
  • Loading branch information...
commit 3536f891087a98dbb7b449b30e109e9ba5a4e2e1 1 parent 60b46d7
Adrian Holovaty authored October 24, 2006

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. 10  django/core/management.py
10  django/core/management.py
@@ -540,7 +540,7 @@ def syncdb(verbosity=1, interactive=True):
540 540
                         transaction.rollback_unless_managed()
541 541
                     else:
542 542
                         transaction.commit_unless_managed()
543  
-                
  543
+
544 544
 syncdb.args = ''
545 545
 
546 546
 def get_admin_index(app):
@@ -627,6 +627,7 @@ def install(app):
627 627
 def reset(app, interactive=True):
628 628
     "Executes the equivalent of 'get_sql_reset' in the current database."
629 629
     from django.db import connection, transaction
  630
+    from django.conf import settings
630 631
     app_name = app.__name__.split('.')[-2]
631 632
 
632 633
     disable_termcolors()
@@ -638,13 +639,14 @@ def reset(app, interactive=True):
638 639
     if interactive:
639 640
         confirm = raw_input("""
640 641
 You have requested a database reset.
641  
-This will IRREVERSIBLY DESTROY any data in your database.
  642
+This will IRREVERSIBLY DESTROY any data for
  643
+the "%s" application in the database "%s".
642 644
 Are you sure you want to do this?
643 645
 
644  
-Type 'yes' to continue, or 'no' to cancel: """)
  646
+Type 'yes' to continue, or 'no' to cancel: """ % (app_name, settings.DATABASE_NAME))
645 647
     else:
646 648
         confirm = 'yes'
647  
-        
  649
+
648 650
     if confirm == 'yes':
649 651
         try:
650 652
             cursor = connection.cursor()

0 notes on commit 3536f89

Please sign in to comment.
Something went wrong with that request. Please try again.