Conceptual
Login

Django 6 New Features: Background Tasks, Template Partials, Fetch Modes, Content Security Policy and Mailers, Wired to HTMX

Upgrade a Django app to 6.x and use what it adds: queue work with the Tasks framework, serve HTMX fragments from template partials, stop N+1 queries with fetch modes, ship a nonce-based Content Security Policy and route mail through Mailers. Assumes Python functions and a first Django view.

Estimated Time to Complete

Only available after login

What You'll Learn

Concepts:
Django Nonce Attribute Template Tag Stamps the CSP Nonce on Script and Link Elements Verifying a New Account's Email Address with a Token Retry with Exponential Backoff Password Reset by a Single-Use Token Sent to the Email on File Django save(force_update=True) Raises Model.NotUpdated When No Row Matches Swapping Django's Multipart Upload Parser with a Request Class Attribute Embedding an Inline Image in Django Email with MIMEPart and Content-ID Multi-Stage Flows in One Template by Swapping Named Partials into One Container Django Parallel Test Runner Under the forkserver Start Method Django Task.using Returns a Modified Copy for Priority, Queue and run_after Django StringAgg and Aggregate order_by Work on Every Database Backend Self-Replacing Infinite-Scroll Sentinel with hx-target this and hx-swap outerHTML Django DummyBackend Records Enqueued Tasks Without Running Them for Tests Django Database-Side on_delete SET NULL and SET DEFAULT Require Database Defaults Django preserve_request Redirects with 307 or 308 to Keep Method and Body Scheduling Periodic Tasks with Celery Beat Django 6.1 Signed Cookies Use an Unambiguous Salt with a Legacy Fallback Setting Django Fetch Modes Set on a Manager and Inherited by Related Instances Django ASGI Joins Split HTTP/2 Cookie Headers into request.COOKIES Context Scope of Nested Django Template Partials Guarding Against N+1 Queries by Counting Queries in Django Tests Sending Django Email from a Background @task with JSON Arguments Polling a Django Background Task's Status from HTMX with hx-trigger every Weak References New Features in Python 3.12 Django Template Partials Serving a Full Page or an HTMX Fragment Django AsyncPaginator and AsyncPage Paginate Inside Async Views Django csp_override Decorator Replaces a View's Policy Instead of Merging Sending Django's CSRF Token with HTMX Requests Django System Checks Framework Reporting Problems by Check ID Upgrading Django EMAIL_BACKEND and get_connection() to MAILERS Django querystring Template Tag Merging Several Mappings into One Query String Django Email Rejects CR LF Header Injection with ValueError forloop.length Gives the Total Iteration Count Inside a Django Template for Loop Django Rehashes a Stored Password at Login When PBKDF2 Iterations Rise

Introduction video

No introduction video available

About R2-D2

R

Guide profile coming soon.