Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#6011 closed Bug (fixed)

manage.py flush command not working as advertised

Reported by: Collin Grady <cgrady@…> Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you run manage.py help flush, it indicates that it will be the same as if you ran the sql in manage.py sqlflush

However, once you try to run it, it starts prompting as if it's running syncdb, like reset does.

Flush should be a simple flush as advertised, while reset does the resetting.

Attachments (2)

management-flush-helptext.diff (695 bytes) - added by Aaron C. de Bruyn 9 years ago.
Updated help text for flush command
6011.flush-help.diff (882 bytes) - added by Julien Phalip 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

Flush is intended to return the database to a post-sync state. It is used extensively by the testing system for this reason. In this case, the documentation is at fault and the behaviour is correct.

Reset operates on a per-app basis. As a result, cross-app references really mess with the reset command. I have mentioned a few times that I think reset should be deprecated, but we probably won't do so until such time as a schema evolution approach is introduced to trunk.

Changed 9 years ago by Aaron C. de Bruyn

Updated help text for flush command

comment:2 Changed 9 years ago by Aaron C. de Bruyn

Has patch: set

Updated help text for manage.py flush

comment:3 Changed 6 years ago by Gabriel Hurley

Severity: Normal
Type: Bug

Changed 6 years ago by Julien Phalip

Attachment: 6011.flush-help.diff added

comment:4 Changed 6 years ago by Julien Phalip

Easy pickings: unset

Simply replaced the help text with the one that's in the doc.

comment:5 Changed 5 years ago by Preston Holmes

Triage Stage: AcceptedReady for checkin
UI/UX: unset

Assuming Julien was not core-dev when this patch was attached.

comment:6 Changed 5 years ago by Paul McMillan

Resolution: fixed
Status: newclosed

In [16877]:

Fixed #6011 -- Improved help text for flush command. Thanks Julien for the patch.

Note: See TracTickets for help on using tickets.
Back to Top