Repository is a continuation of django3-learning based on book of Antonio Melé - Django 3 By Example.
Project is based on Python 3.10.* and Django 4.1.0
All required packages are in requirements.txt
pip install -r requirements.txt
Add new package to requirements.in
and compile new file by
pip-compile
To add and install new package run
pip-compile && pip-sync
To add new pre-commit hook, edit .pre-commit-config.yaml
Then install new hooks by
pre-commit install
and check if everythin passes by
pre-commit run --all-files
Terminal 1
docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:management
Termina 2
celery -A myshop worker -l info
Terminal 3
celery -A myshop flower
Terminal 4
docker run -it --rm --name redis -p 6379:6379 redis
stripe login
stripe listen --forward-to localhost:8000/payment/webhook/
docker pull memcached
docker run -it --rm --name memcached -p 11211:11211 memcached -m 64
-
Chapter 8: Building an Online Shop
- Creating an online shop project
- Building a shopping cart
- Registering customer orders
- Asynchronous tasks
-
Chapter 9: Managing Payments and Orders
- Integrating a payment gateway
- Exporting orders to CSV files
- Extending the administration site with custom views
- Generating PDF invoices dynamically
-
Chapter 10: Extending Your Shop
- Creating a coupon system
- Building a recommendation engine
-
Chapter 11: Adding Internationalization to Your Shop
- Preparing your project for internationalization
- Translating Python code
- Translating templates
- Rosetta
- Fuzzy translations
- URL patterns
- Switching languages
- django-parler
- Format localization
- django-localflavor
-
Chapter 12: Building an E-Learning Platform
- Setting up the e-learning project
- Serving media files
- Building the course models
- Creating models for polymorphic content
- Adding authentication views
-
Chapter 13: Creating a Content Management System
- Creating a CMS
- Managing course modules and the contents
-
Chapter 14: Rendering and Caching Content
- Displaying courses
- Adding student registration
- Accessing the course contents
- Using the cache framework
-
Chapter 15: Building an API
- Building a RESTful API
-
Chapter 16: Building a Chat Server
- Creating a chat application
- Real-time Django with Channels
- Installing Channels
- Writing a consumer
- Routing
- Implementing the WebSocket client
- Enabling a channel layer
- Modifying the consumer to be fully asynchronous
- Integrating the chat application with existing views
-
Chapter 17: Going Live
- Creating a production environment
- Using Docker Compose
- Serving Django through WSGI and NGINX
- Securing your site with SSL/TLS
- Using Daphne for Django Channels
- Creating a custom middleware
- Implementing custom management commands
- Source code for this chapter
- Static files for the project
- Django session settings
- Django built-in context processors
- Information about RequestContext
- Celery documentation
- Introduction to Celery
- Official RabbitMQ Docker image
- RabbitMQ installation instructions
- Flower documentation
- Source code for this chapter
- Stripe website
- Stripe Checkout documentation
- Creating a Stripe account
- Stripe account settings
- Stripe Python library
- Stripe test API keys
- Stripe API keys documentation
- Stripe API version 2022-08-01 release notes
- Stripe checkout session modes
- Building absolute URIs with Django
- Creating Stripe sessions
- Stripe-supported currencies
- Stripe Payments dashboard
- Credit cards for testing payments with Stripe
- Stripe webhooks
- Types of events sent by Stripe
- Installing the Stripe CLI
- Latest Stripe CLI release
- Generating CSV files with Django
- Django administration templates
- Outputting PDF files with ReportLab
- Installing WeasyPrint
- Static files for this chapter
- Source code for this chapter
- List of valid language IDs
- List of internationalization and localization settings
- Homebrew package manager
- Installing gettext on Windows
- Precompiled gettext binary installer for Windows
- Documentation about translations
- Poedit translation file editor
- Documentation for Django Rosetta
- The django-parler module’s compatibility with Django
- Documentation for django-parler
- Django formatting configuration for the Spanish locale
- Django format localization
- Documentation for django-localflavor
- Source code for this chapter
- Using Django fixtures for testing
- Data migrations
- Creating custom model fields
- Static directory for the e-learning project
- Source code for this chapter
- Django mixins documentation
- Creating custom permissions
- Django formsets
- Django model formsets
- HTML5 drag-and-drop API
- HTML5 Sortable library documentation
- HTML5 Sortable library examples
- django-braces documentation
- Source code for this chapter
- django-embed-video documentation
- Django’s cache framework documentation
- Memcached downloads
- Memcached official website
- Pymemcache 's source code
- Django Redisboard’s source code
- Source code for this chapter
- REST framework website
- REST framework settings
- REST framework renderers
- REST framework parsers
- REST framework generic mixins and views
- Download curl
- Postman API platform
- REST framework serializers
- HTTP basic authentication
- REST framework authentication
- REST framework permissions
- REST framework ViewSets
- REST framework routers
- Python Requests library documentation
- Authentication with the Requests library
- Source code for this chapter
- Introduction to ASGI
- Django support for asynchronous views
- Django support for asynchronous class-based views
- Django Channels documentation
- Deploying Django with ASGI
- json_script template filter usage
- Source code for this chapter
- Docker Compose overview
- Installing Docker Desktop
- Official Python Docker image
- Dockerfile reference
- requirements.txt file for this chapter
- YAML file example
- Dockerfile build section
- Docker restart policy
- Docker volumes
- Docker Compose specification
- Official PostgreSQL Docker image
- wait-for-it.sh Bash script for Docker
- Service startup order in Compose
- Official Redis Docker image
- WSGI documentation
- List of uWSGI options
- Official NGINX Docker image
- NGINX documentation
- ALLOWED_HOSTS setting
- Django’s system check framework
- HTTP Strict Transport Security policy with Django
- Django deployment checklist
- Self-generated SSL/TLS certificate directory
- Let’s Encrypt Certificate Authority
- Daphne source code
- Using Docker Compose in production
- Docker Swarm mode
- Kubernetes
- Django middleware
- Creating custom management commands