
Learn to design and implement a Django DRF e commerce inventory RESTful API, including database design, routers, view sets, and sterilizers, with testing and documentation for front end integration.
Install Python 3.9.5 on Windows 10 or 11 from python.org, add to path, choose 64-bit, customize install location, and verify with python --version.
Create and activate Python virtual environments in Visual Studio Code, isolate project dependencies, handle PowerShell execution policy adjustments, and understand activation and deactivation steps for Django projects.
Create a new Django project and verify its setup by starting the development server with manage.py, then open the provided URL to confirm installation.
Discover how to create a Django application after building a Django project, using the startapp command across platforms, and organizing apps like product and checkout within a core folder.
Start the Django development server with runserver using macOS, Linux, or Windows commands. Understand 127.0.0.1 loopback and port numbers like 8000 (or 8080) for local access.
Trace how a browser request reaches a Django app and matches a URL to a view. The view renders a template with data and returns html to the browser.
Define a preliminary table list and field list for the inventory RESTful API by analyzing requirements and identifying entities such as product, product line, and category, with their fields.
Maintain consistency with unique, descriptive table and field names across the database, while balancing design and implementation choices in Django and SQL, and noting PEP8 for Python naming.
Explore how to uniquely identify rows with primary keys in a Django relational database, and how integers like the auto-generated id field enable foreign keys and table relationships.
Set up a new django project for a drf eCommerce app by installing python, creating and activating a virtual environment, installing django with pip, and starting the server.
Configure environment variables to securely store secrets like the Django secret key and database credentials, load them into settings via a .env file, and prepare for production deployment.
Master source control with Git and GitHub Desktop by creating a new django drf ecommerce repository, committing changes, and pushing to GitHub while configuring .gitignore for sensitive files.
Implement a default DRF router to auto-create endpoints from a category view set under the API prefix. Connect routes with include and test migrations and admin access.
Learn how to generate and document a Django DRF e-commerce API using DRF spectacular and Swagger UI, including schema creation, automatic endpoint docs, and front-end Swagger interaction.
Connect the product model to brand and category via foreign keys and serialize related data with nested serializers. Expose a product endpoint that returns brand and category details.
Set up coverage with PI test to auto discover tests and generate an html coverage report for your Django DRF ecommerce project, and identify needed tests in models and views.
Compare unit tests and end-to-end tests, then demonstrate mocking to isolate a unit. Validate an API workflow from client request to database response.
Identify what to test in a Django project by categorizing components into unit tests for models, serializers, views, and URL configurations, plus end-to-end API endpoint tests.
Test end-to-end APIs using the API client in a Django rest framework project by validating endpoints, responses, and database interactions with fixtures and factories.
Dive into building a rest api for an e-commerce app by analyzing user stories, identifying data endpoints, and modeling category, product, and product detail retrieval.
Learn to edit multiple models on a single admin page using tabular inline, linking product and product line in Django.
Learn to handle reverse relationships in django rest framework by exposing product line data through the product serializer with a related name and many=True, and refine output with field exclusion.
Reduce n+1 queries in django drf ecommerce by using select related for category and brand and prefetch related for product lines, enhancing data retrieval and performance.
Run tests with pytest and view coverage reports to identify gaps. Configure pytest with a setup.cfg for scalable test settings across packages, and learn to run focused tests.
Develop and validate a new product line model in Django DRF, focusing on the model clean method, duplicate order validation, and expanding test coverage using factories.
Merge the 1.02 development branch into main after migrations cleanup, updating gitignore, and pushing commits, then create a pull request and start a new development branch.
Create a new Git branch from main in source control for development, name it dev, refresh GitHub desktop to pull updates, and prepare to develop with the updated data.
Merge the dev 1.03 branch into main, review changes, open a pull request, and merge to prepare the main branch for the next development branch.
Create a new git branch in the GitHub repository from the main branch, using the view branches menu, name it dev 1.0, and refresh to confirm.
Design a flexible product attribute system by linking product lines to product types, using a link table to model attribute-to-product-type many-to-many relationship, and enabling data retrieval with foreign keys.
Customize the serialization output in Django DRF to return the attribute ID and value for product lines, enabling the front end to present data accurately.
Learn to enforce unique attribute assignments for each product line by implementing a two-step validation in Django rest framework, preventing duplicate attribute values and ensuring clean saves.
Developing applications can be a fun and effective way of learning a language and framework. In this course, at phase 1, we start building and testing an eCommerce inventory RESTful API with DRF (Django Rest Framework).
This course is primarily designed for anyone looking for a learning journey building applications with the Django Rest Framework, developing, testing and documenting a RESTful API.
Currently, this course presents our first iteration of this course and phase 1 of the development process. This course will evolve and extend over time as we iterate on the content to maximise learning opportunities.
As presented in phase 1 of the course, we initiate the project and start building and testing the core functionality of the RESTful API application. In Phase 1, we learn the fundamentals of the Python Django Rest Framework, design a database, implement testing throughout the application and work towards building our first endpoints while also automatically documenting our efforts. By the end of phase 1, you will have learnt how to start a new Django DRF project and create routers, serializers and viewsets to enable clients to interact with your API. Throughout the development process, we learn how to test our application using Pytest and document our endpoints in preparation for front-end development using SwaggerUI.
We intend to extend the content of the course to eventually include deeper relevant content to aid further your understanding of the development process and techniques, deployment, and other associated technologies. Due to the scale of our courses we hope to bring to you our approach to building courses is a phased, iterative approach. Having time to reflect, analyse and seek feedback is essential to ensure that we develop courses that will ultimately meet the highest expectations.
I hope you enjoy the course.