I currently have URLs of the form /blue - each URL is a colour. The associated URL pattern is as follows:
(r'^(?P<colour>\w+)$', 'views.colour')
I'm wondering if it's possible to have URLs that look like a natural language list, of indeterminate length, separated by -or-:
/blue-or-green-or-yellow
Ideally the associated URL pattern would append each match to a Python list, ready to be handled in the view:
(r'^(?P<colour_list>\w+)(?:-or-(?P<colour_list>\w+))+$', 'views.colour')
Is there any way to do this in Django?