[RFC 2/2] REST: Add Projects to the REST API

Finucane, Stephen stephen.finucane at intel.com
Sat Mar 26 00:28:18 AEDT 2016


On 24 Mar 13:57, Andy Doan wrote:

[snip]

> NOTE: Damien's code only exposes: ('id', 'name', 'linkname',
> 'listemail', 'web_url', 'scm_url', 'webscm_url'). ie
> "send_notifications" and "use_tags" are hidden. I didn't see why
> that would be helpful, and it also adds to development costs to have
> to remember a field added to models.Project means a change needed
> for this. Does this make sense?

I'm fine exposing 'send_notifications', as I think it's a valid
property that people would like to know about. If you wanted to hide
it, however, could you use 'exclude' [1]?

Stephen

[1] http://www.django-rest-framework.org/api-guide/serializers/#specifying-which-fields-to-include


More information about the Patchwork mailing list