[PATCH v4 04/10] REST: Add Persons to the API

Andy Doan andy.doan at linaro.org
Fri May 27 11:12:38 AEST 2016


On 05/25/2016 04:22 AM, Finucane, Stephen wrote:
>> +class PersonSerializer(HyperlinkedModelSerializer):
>> >+    class Meta:
>> >+        model = Person
>> >+        exclude = ('user',)
> You've added a 'users' endpoint in this revision. This being the case,
> it now makes sense to expose the user object, or at least a URL to the
> endpoint (it didn't before as 'user' was a simple integer that we
> couldn't do anything with). You could also drop the 'username', if you
> wanted to, though there may still be value in keeping it?

Good point. I'm dropping "username" and just exposing "user" as URL to 
to keep things consistent.



More information about the Patchwork mailing list