tags:

views:

125

answers:

1

Hi folks. Suppose I've got urls on my site which look like /qwe/asd/zxc/wer/sdf/xcv/ (unknown number of \w+ blocks separated by slashes).

Is that possible? to construct a urlpattern to catch those urls so that:

  1. a view function would get all those \w+ strings in *args list to it
  2. the {% url qwe asd zxc wer sdf xcv %} templatetag would reconstruct supposed /qwe/asd/zxc/wer/sdf/xcv/ url the right way

Thanks

A: 

For No.1 (r'^(?P<url>[\w/]+)$', 'views.handler') could do that.

S.Mark
Unfortunately, that's not it( I'm looking for a solution without a handler, but via strict regexp. Anyway thanks.
MG