[Django]-Storing data with leading zeros in an integer column for Django

4๐Ÿ‘

โœ…

I think your best bet is to store it as a string in a charfield and then cast it when you need something else.
i.e.

num = "051"
int(num)

if you need it as an int. Could you give a little more information about what the api expects and why you need the leading zeroes?

๐Ÿ‘คjoshcartme

Leave a comment