Code

Opened 7 years ago

Closed 7 years ago

#2932 closed enhancement (fixed)

[patch] manage.py reset warning should be more specific

Reported by: pb@… Owned by: adrian
Component: Core (Management commands) Version: master
Severity: minor Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The warning prompt that you get from manage.py reset currently reads:

You have requested a database reset.
This will IRREVERSIBLY DESTROY any data in your database.
Are you sure you want to do this?

This patch makes a small change to this function so that it identifies what application and database are being affected. The new wording (assuming an app named "catalog" and a db named "store") looks like this:

You have requested a database reset.
This will IRREVERSIBLY DESTROY any data for
the "catalog" application in the database "store".
Are you sure you want to do this?

When jumping between multiple Django projects in development on the same server I found I was wanting this reminder, particularly the name of the database, as a sanity check. I added the app name mostly for accuracy -- the current warning makes it sound like the whole database will be wiped out, which isn't true.

Attachments (1)

reset.diff (957 bytes) - added by pb@… 7 years ago.
management.py patch

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by pb@…

management.py patch

comment:1 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [3932]) Fixed #2932 -- Added more details to the warning message in 'manage.py reset'. Thanks for the patch, pb@…

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.