[Answer]-Handling '/' in url match in Django

1👍

How do you resolve an url with additional slash by hand? Let’s say: callfunc/foo/bar/baz/. Does bar belong to param1 or param2? I think under this conditions it is not possible to distinguish the two params properly.

You can try to add a special disconnector: r'^callfunc/(?P<param1>[\w\d\-/]{1,50})/special-versus/(?P<param2>[\w\d\-/]{1,50})/$' It should be more or less impossible that the disconnector appears in on of your params.

Leave a comment