How can I create a url pattern for two parameters where the first parameter contains a forward slash as part of its contents:
da/ta1=/data2
Intially I had the following pattern:
(r'^view/(?P<item_id>\w+=)/(?P<changekey>\w+)/$', 'view'),
However this pattern does not match because of the first forward slash which is part of the parameter data.
Assuming you construct the url yourself, you could use
quote_plusto encode the inline forward slash:And to decode:
To then match your data, your pattern could be changed to the construct found below. For the first parameter, this matches everything up to the
=character; the second parameter is expected to be alphanumerical.