I have a url that accepts request parameters that may have spaces in it. I know this looks pretty simple, but my regex doesn't work for me.
Here is my url pattern definition:
url( r'^item_info_details_view/(?P<itemno>[\w \/&-]+)/$', 'purchasing.views.item_info_details_view'),
An element may be a phrase, such as FAX MODEM , that contains a space.
However, when I pass it such a parameter, the URL of my browser
http://localhost/item_info_details_view/FAX%20MODEM/
And displays this information for debugging:
Using the URLconf defined in urls, Django tried these URL patterns, in this order: ^$ The current URL, item_info/FAX MODEM/, didn't match any of these.
user6727366
source share