Opened 10 years ago
Closed 10 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 )
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 , 10 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 10 years ago
| Has patch: | set |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
comment:3 by , 10 years ago
| Triage Stage: | Accepted → Unreviewed |
|---|
comment:4 by , 10 years ago
| Patch needs improvement: | set |
|---|---|
| Summary: | Incorrect indication for datetime default vaues → Clarify migration questioner datetime default value |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Bug → Cleanup/optimization |
comment:5 by , 10 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 , 10 years ago
| Patch needs improvement: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
| Version: | 1.9 → master |
The () in the old message is in my opinion an oversight on my site. I'd have used timezone.now from the beginning.
Note:
See TracTickets
for help on using tickets.
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.