Wayne Lambert
API endpoints for the Django Blog Project
The Django blog also has some REST API endpoints that can be used by a front-end developer to render the fields with a framework such as React, Vue, Angular, or Ember.
Naturally, the implementation of these endpoints is a highly contrived example for portfolio demonstration purposes.
I set out to build a browsable API endpoint that would enable front-end developers to render the fields from the application using their chosen front-end framework such as React, Vie, Angular or Ember.
My starting point was to research the setting of the endpoints using serializers.
Additional research was required for some of the less frequently used aspects of creating an API such as rendering properties that have been defined against a model, or fields that have been defined in a downstream model.
The implementation differs for the various relationships between database tables. Within the blog project, there are examples of all of the main database join types: one-to-one, one-to-many, and many-to-many.
I would like investigate documenting the API using something like Swagger. There are also some small customisations that I would like to make to the base template with regards to titling and descriptions.