Master Windows Internals - Kernel Programming, Debugging & Architecture
Get 20% off all career paths from fullstack to AI
Overview
Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
This conference talk from DjangoCon US 2024 explores the advanced usage of path converters in Django URL patterns. Learn how path converters have largely replaced regexes since Django 2.0 for defining URL patterns that trigger views. Discover techniques for creating custom path converters that can parse various data types and automatically fetch model objects based on primary keys or unique fields. Explore how to implement lazy objects that postpone database queries until needed, potentially saving roundtrips and improving performance. The talk also addresses a common debugging challenge: overlapping path patterns where multiple patterns can match the same URL, with only the first one being triggered. See how this issue affects even Django's admin pages and learn mitigation strategies for when models use CharField primary keys with values like "remove" or "history" that conflict with admin URL patterns. Willem Van Onsem provides practical insights for more efficient URL pattern management in Django applications.
Syllabus
DjangoCon US 2024: path('/user/user.username:user/', view_profile) with Willem Van Onsem
Taught by
Confreaks