Hi,
I have a model with an integer field storing a duration in hours, while I want to present that to users in a form in days. (The choice of these different units is imposed by other factors not under my control.)
When editing an existing model however, I need to take the value from the model stored in hours, and convert that to days for display in the edit form. I've considered various places where I could do that conversion, for instance in the edit view, or the form __init__() method, or the model field's value_from_object() method, but none of those choices seem like the obvious choice, and I can't find a recommendation for how to do this either.
What would you suggest? And is the recommended approach actually documented somewhere that I've missed?
Thanks,
Tim