[Answered ]-Confusion of using Django rest Frame work

1👍

An API makes it easier for your client to automate web site management, connect mobile apps, create a richer front-end experience, and integrate your work with other applications. With an API, they can build each new component over time instead of all at once, so a cash-strapped client can start with a web experience, then add a mobile app later. The mobile app could even be made by a different developer, enabling your client to hire a mobile app specialist instead of a general developer.

Registration, login, and logout are very similar to a regular web site.

  • You send a POST request to register, including your desired username and password.
  • You send a POST request to login and get your authentication token, sending your username and password.
  • You send your authentication token as a HTTP header with every request.
  • You send another POST request to logout.

You can read the official Django Rest Framework authentication docs for details, but it doesn’t really tell you how to implement these steps. Check out this blog post instead.

Leave a comment