This is not a real problem and really not a big deal. Just my curiosity.
I was reading about best practices in building an API and I came across
to this
http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#snake-vs-camel
Lets say I have a model
class UserProfile(models.Model):
user = models.OneToOneField(User, related_name='userprofile',
primary_key=True)
birth_date = birth_date = models.DateField(verbose_name='Birth Date',
default=timezone.now)
and a serializer
class UserListSerializer(serializers.ModelSerializer):
class Meta:
model = UserProfile
Is there any simple way to change birth_date field to camelCase without
having to use SerializerMethodField? Somehow defining a tuple or a map
maybe? I checked the documentation but I can't find something relevant.
Again not a big deal. Just curious.
--
You received this message because you are subscribed to the Google Groups "Django
REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.