Entries published on December 16, 2023
Say what you mean in a regex
This is part of a series of posts I’m doing as a sort of Python/Django Advent calendar, offering a small tip or piece of information each day from the first Sunday of Advent through Christmas Eve. See the first post for an introduction.
An URL-y warning
Suppose you’re writing a blog in Django, and you get to the point where you’re setting up the URLs for the entries. Django has two ways to write URLs, depending on your preferred style:
- The
path()
function, which uses path-converter syntax to let you declare the types you expect things to be and …