Skip to Content
Django RESTful Web Services
book

Django RESTful Web Services

by Gastón C. Hillar
January 2018
Intermediate to advanced
326 pages
7h 38m
English
Packt Publishing
Content preview from Django RESTful Web Services

Generalizing and mixing behavior

The previous classes took advantage of generalized behavior. Each of the superclasses for the classes mixed different generalized behaviors. The following table summarizes the HTTP verbs that each class-based view is going to process and the scope to which it applies. Notice that we can execute the OPTIONS HTTP verb on any of the scopes:

Scope

Class-based view name

HTTP verbs that it will process

Collection of drone categories: /drone-categories/

DroneCategoryList

GET, POST, and OPTIONS

Drone category: /drone-category/{id}

DroneCategoryDetail

GET, PUT, PATCH, DELETE, and OPTIONS

Collection of drones: /drones/

DroneList

GET, POST, and OPTIONS

Drone: /drone/{id}

DroneDetail ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Versatile Mobile Apps with Python and REST: RESTful Web Services with Django and React

Building Versatile Mobile Apps with Python and REST: RESTful Web Services with Django and React

Art Yudin

Publisher Resources

ISBN: 9781788833929Supplemental Content