Opened 8 years ago

Closed 8 years ago

#26443 closed Cleanup/optimization (fixed)

Clarify migration questioner datetime default value

Reported by: Iacopo Spalletti Owned by: Iacopo Spalletti
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Iacopo Spalletti)

InteractiveMigrationQuestioner._ask_default prompt states that a sensible date default is timezone.now() while it should be timezone.now (https://github.com/django/django/blob/master/django/db/migrations/questioner.py#L106)

Change History (7)

comment:1 by Iacopo Spalletti, 8 years ago

Description: modified (diff)

comment:2 by Iacopo Spalletti, 8 years ago

Has patch: set
Owner: changed from nobody to Iacopo Spalletti
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:3 by Iacopo Spalletti, 8 years ago

Triage Stage: AcceptedUnreviewed

comment:4 by Tim Graham, 8 years ago

Patch needs improvement: set
Summary: Incorrect indication for datetime default vauesClarify migration questioner datetime default value
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

The difference seems to be that the current suggestion generates the time that the migration was generated while the proposed change will generate the time the migration is run. I'm not sure either is a particularly helpful default suggestion without a clarification about this.

comment:5 by Iacopo Spalletti, 8 years ago

Do you think the questioner prompt is the right place to clarify the difference? Or rather have it somewhere in the documentation?

comment:6 by Markus Holtermann, 8 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin
Version: 1.9master

The () in the old message is in my opinion an oversight on my site. I'd have used timezone.now from the beginning.

comment:7 by Markus Holtermann <info@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 394755b8:

Fixed #26443 -- Corrected timezone.now in MigrationQuestioner prompt

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