Store large hours in python

1

I have a variable in a table of my model that is called duracion that is of type TimeField , there I will store the total duration of the calls, both in hours, minutes and seconds, that a person makes in a period of time. The problem is that when that amount already exceeds 24 hours it puts any value less than 24. Is there any way to specify that the hours will be greater than 24?

    
asked by Coloma 04.06.2016 в 17:51
source

1 answer

1

Since version 1.8 of Django you can use the type DurationField .

It is most advisable to store periods of time by timedelta .

    
answered by 04.06.2016 в 18:10