As re_path and url syntax utilize regex, true optional trailing slashes are
allowed for with the following example:
re_path(r'^about/?$', AboutView.as_view(), name='about')
In this example, a request to both /about and /about/ would yield a 200
response.
Using *path* would look like this:
p
Hi Jason
I think in this case “just use re_path()” is the way to go. (path() being a
convenience, rather than a replacement.)
For me, complicating the signature of path() for such a corner case
wouldn’t be a good trade-off.
Kind regards,
Carlton.
On Wed, 28 Aug 2019 at 20:47, Jason Brill wrote