[PATCH 02/13] REST: Remove '_url' suffixes

Daniel Axtens dja at axtens.net
Mon Nov 21 11:25:50 AEDT 2016

Hi Stephen,

This sounds fine to me. The commit message would benefit from a
before-and-after example, but it's not a massive issue.

> This was a design decision made when implementing the REST API. The
> idea was that these items were URLs to related objects and should be
> indicated as such. However, this was a faulty assumption as the
> Patchwork API, unlike other some other APIs (GitHub), does not also
> include a full representation of said objects, like so:
>     {
>       "url": "http://localhost:8000/api/1.0/patches/1/",
>       ...
>       "delegate_url": "http://localhost:8000/api/1.0/users/1",
>       "delegate": {
>         "url": "http://localhost:8000/api/1.0/users/1/",
>         "username": "admin",
>         "first_name": "",
>         "last_name": "",
>         "email": ""
>       }
>     }
> Since there is no intention to support this design yet, there isn't
> really any reason to fight django-rest-framework in appending these
> suffixes. Simply remove them.
> Note that the API version if not bumped as the API is still considered
----------------------------^ *is
> unreleased.


More information about the Patchwork mailing list