© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
V. GagliardiDecoupled Django https://doi.org/10.1007/978-1-4842-7144-5_6

6. Decoupled Django with the Django REST Framework

Valentino Gagliardi1  
(1)
Colle di Val D’Elsa, Italy
 
This chapter covers:
  • The Django REST Framework with Vue.js

  • Single-page applications in Django templates

  • Nested DRF serializers

In this chapter, you learn how to use the Django REST Framework to expose a REST API in your Django project, and how to serve a single-page application within Django.

Building the Billing App

In the previous chapter, we created a billing app in the Django project. If you haven’t done this yet, here’s a quick recap. First off, configure DJANGO_SETTINGS_MODULE:
export ...

Get Decoupled Django: Understand and Build Decoupled Django Architectures for JavaScript Front-ends now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.