It occurred to me, last night as I was drifting off to sleep, that the  
only problem with just subclassing the DurationField widget, is that  
you won't see any value over 24hrs, as that will spill over into days.

So - looks like your only option is to write your own version of  
Duration Field. I would revert that patch you applied, and just  
subclass MultiWidget and MultipleValueField. You shouldn't need the  
rest of that patch. You will need to decide how it will be stored in  
the database. Integer would work in your case, if you aren't worried  
about microseconds. Look at the DurationField code for some guidelines  
on how this is done.

On Apr 29, 2008, at 7:24 AM, Bram Duvigneau wrote:

>
> Hello,
>
> I'm using the DurationField from
> http://gulopine.gamemusic.org/2007/nov/03/storing-passages-of-time/
>
> This is working fine, but the included widget shows text fields for
> days, hours, minutes, seconds and microseconds. I would like to have
> hours:minutes. The best solution seems to be that I just render two
> fields of the widget, I could copy the widget and modify this in code,
> but that doesn't seem nice to me. So, here's my question: how could I
> render specific widgets of a MultiWidget in my template?
>
> Bram
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to