In Django2.0 were introduced path()
and re_path()
.
But the difference between boths is unclear to me : is it about the ability to use or not regexps with it?
Would that mean that I couldn't use both <type:name>
and (?P<name>\d+)
syntaxes in the same pattern?
For my understanding is that the path
function does not accept regex urls anymore, you need to use the new urls syntax <slug:title>
instead of passing a regex to match parameters. The re_path
only work with regex formatted urls (The old way we make urls).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With