Learn how to create a route to an APIView subclass for a GET HTTP method by exploring routes and URL configs.
- [Instructor] Presently we are taking a look at how to … connect the product list API view to a URL route. … We start by opening up the URL's Configuration … for the web app and we see some URLs are already in there. … And now we have to connect our List API view, … the Product List API view, to a route. … And we are going to use api_views.ProductList.as_view. … And we have to import store.api_views. … That's all there is to it. … This will let us send a GET request … to the API V1 product's URL, … and get back a JSON response that shows a list of products. … To run the server, you have to be in … the top level directory. … So we activate virtualenv, … and then we run the server. … Now here's a cool way of testing to … make sure the product's List API view is working. … We switch to the browser, … and we can actually try out the REST API, … from the browser. … This is what makes Django REST framework different … from all other REST API frameworks. … If you add a docstring to your API view subclass, …
- Creating a serializer
- Working with API views
- Filtering back ends
- Enabling pagination
- Executing CRUD operations
- Managing serializer fields
- Testing API views
Skill Level Intermediate
Deploying Django Apps: Make Your Site Go Livewith Nick Walter2h 43m Intermediate
Demo project overview1m 19s
1. Serializing, Listing, Filtering, and Paginating Models
2. Create, Retrieve, Update, and Delete (CRUD) Operations for Models
3. Managing Serializer Fields, Relations, and Validation
4. Testing API Views
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.