django - regex for optional url parameters
问题 I have a view in django that can accept a number of different filter parameters, but they are all optional. If I have 6 optional filters, do I really have to write urls for every combination of the 6 or is there a way to define what parts of the url are optional? To give you an example with just 2 filters, I could have all of these url possibilities: /<city>/<state>/ /<city>/<state>/radius/<miles>/ /<city>/<state>/company/<company-name>/ /<city>/<state>/radius/<miles>/company/<company-name>/