As I can't save special characters in fields in django model I have to bypass it. For example: I would like to have "km/h" field. So I'm using it like:
class Unit(models.Model):
kmh = models.FloatField(null=True, db_column='km/h', verbose_name='km/h')
then I have example serializer:
class UnitSerializer(serializers.ModelSerializer):
class Meta:
model = Unit
fields = ['kmh']
and when I'll use it with APIViews response which will include the field will look like:
{
"kmh":10,
}
I would like to make it look like my verbose_name so:
{
"km/h":10
}
How can I do it? I have like 30 of these fields with special characters.