10

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?

vmonteco
  • 14,136
  • 15
  • 55
  • 86

1 Answers1

11

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).

Luan Fonseca
  • 1,467
  • 1
  • 13
  • 22