Learn how to create a POST HTTP method URL route by exploring the URL configuration and CreateAPIView subclass.
- [Narrator] Now we can create a route … in the URL configuration for creating a product … through the product create API view. … We add a new URL path … that points … to the product create view. … With that done, let's run the server. … To test the API to create a new product, … let's use the curl command on the console. … We set the method to post and point … to the API URL that we just added. … We set the price to one dollar, … set the product name to 'My Product', … and set the description 'Hello World'. … As you can see we get a response … from the API indicating that the product was created. … This is something I do very often when I work … with Rust APIs. … The development team shares the curl scripts … with each other so we can quickly create new models … and test APIs to make sure they are working correctly. … Now, let's see how this looks in the browser. … Django REST Framework provides a nice interface … that makes it easy for us to test creating new products. … So you can see we have a nice form with multiple fields …
- 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.