codenameyau / vagrant-boxes

:gift: Collection of vagrant boxes
2 stars 0 forks source link

Create API app for RESTful class-based views #9

Open codenameyau opened 9 years ago

codenameyau commented 9 years ago

Ideally the API views should be an abstract class-based views that support the following methods:

HTTP responses should be wrapped around the Django HttpResponse subclasses: https://docs.djangoproject.com/en/1.7/ref/request-response/#httpresponse-subclasses

Data from the API should be returned as a JsonResponse object: https://docs.djangoproject.com/en/1.7/ref/request-response/#jsonresponse-objects

codenameyau commented 9 years ago

Adhere by this common REST pattern:

# GET, POST
api/flavors/ 

# GET, PUT, DELETE
api/flavors/:id-or-slug/