How to include format in url that is generated from Django Rest Framework's HyperlinkedModelSerializer? -
i'd have url field generated hyperlinkedmodelserializer
include query parameters of current request. way when i'm browsing via browsable api links go respect browsable api pages.
is there easy way this? ideally i'd way add of serializers (perhaps overriding hyperlinkedrelatedfield
?).
so far have is...:
the_url = serializers.serializermethodfield() def get_the_url(self, object): print self.context['request'].get.get('format')
that gets me format
i'm not sure go there.
Comments
Post a Comment