GrafeasGroup / blossom

The website. The app. The everything.
6 stars 3 forks source link

RFC: Change `HyperlinkedModelSerializer`s to normal serializers #200

Open TimJentzsch opened 3 years ago

TimJentzsch commented 3 years ago

The idea of the HyperlinkedModelSerializers is good: When you want to fetch an object that is referenced in another model, you can simply query the given URL. However, in practice, we will always use the API wrapper to make the requests, so we can't use the full URL. Instead, we need to extract the ID from the URL and use that for the request. This is adding additional code and makes the requests more error prone.

I suggest that we just provide the normal IDs instead. This will require some refactoring, but will ultimately make the tor and buttercup requests easier.