I am creating an app that basically stores shoe sizes, along with other information. I have been using the Django Decimal field to store the sizes, however the decimal field stores sizes like 10 as 10.0, so my question is, is there a way to make or if already exists a field that when provided an int ( 10 ) it stores the value as int and when provided a decimal ( 10.5 ) then stores it as decimal ?
Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...