eCommerce 2 API is a step-by-step guide to implementing an RESTful API into your eCommerce 2 project using the Django Rest Framework, Django Rest Framework JWT, Django CORS Headers, and more.
The project we use is eCommerce 2. Created by Team CFE @ http://joincfe.com.
-
Implement a RESTful API (wikipedia) to a pre-existing eCommerce project made in Django. (Souce Code | Video Series)
-
Products & Categories
- Create Serializers and API Views
- Product variations API (pricing + name)
- Implement product photos
-
Querying & Filtering
- Create a Search Function for the API
- Enable a Django Filter for further filtering of Search Results (or List Results)
-
User Specific
- Cart, Checkout, & finalizing Orders
- JWT (JSON Web Token) Authentication
- View User-only Orders
-
Required Packages
- Everything in
src/requirements.txt
of the eCommerce 2 project - Django Rest Framework (for API)
- Django Rest Framework JWT (for Auth)
- Django CORS Headers (for cross-origin HTTP requests)
- Everything in
Interested in learning more?
Sign up on our YouTube channel
Become a member on Coding for Entrepreneurs
The tutorial code below is the final code from the end of each tutorial video. Each link below is tied directly to the tutorial's title. Please note that some videos will not have code reference code.
9 - Product & Variation Serializers
10 - Product List & Retrieve View
11 - Update & Create in the API
21 - Testing JWT Tokens with Python Requests
26 - Testing Cart API with Python Requests
35 - User Address Create & List
38 - Custom Serializer for Checkout
41 - Order from Validated Data