Modify ↓
Ticket #225 (closed enhancement: fixed)
Tweak to ease default values for TimeFields?
| Reported by: | anonymous | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7 |
| Component: | migrations | Version: | 0.6 |
| Keywords: | Cc: |
Description
Hi
In a model I have a TimeField? which is related to, say, a moment in a video clip, which (for reasons pointless to explain here), defines the option default=datetime.time(0,1)
Django doesn't mind this, but when migrating, postgres chokes because the time is, say: 00:01:00 and it doesn't like the colons.
So, a workaround is default=('%s' % datetime.time(0,0)) but I thought I'd suggest perhaps a little auto-to-string conversion, just to make life easier?
Cheers
Steve
Attachments
Change History
comment:2 Changed 4 years ago by andrew
- Status changed from assigned to closed
- Resolution set to fixed
Fixed in [44ed48f7ee0a].
Note: See
TracTickets for help on using
tickets.

Looks like we need to do some casting; not a vital fix, so scheduling for 0.7.