Hi Oli,

TimeField seems to be an ideal choice for this purpose.

If your only concern is how it displays in the admin "list view", you
can take care of that with a custom function in your model. Something
like this:

def get_duration(self):
        return self.duration.strftime('%-M:%S')
get_duration.short_description = 'Duration'

And then add 'get_duration' to list_display in Track's Admin class.

Also, you can use this function anywhere else you need to display the
track duration in your templates.

-Rajesh


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to