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: |
| GET, POST, and OPTIONS |
Drone category: /drone- |
| GET, PUT, PATCH, DELETE, and OPTIONS |
Collection of drones: |
| GET, POST, and OPTIONS |
Drone: |
| GET, PUT, PATCH, DELETE, and OPTIONS |
Collection of Pilots: |
| GET, POST and OPTIONS |
Pilot: |
| GET, PUT, PATCH, DELETE and OPTIONS |
Collection of competitions: |
| GET, POST and OPTIONS |
Score: |
| GET, PUT, PATCH, DELETE... |