Wednesday, November 28, 2012

How to make a url pattern that catch any url ?

Hi

I am serving some files, and I want whenever I have a url :/download/path/to/some/file to map this to a view function with path/to/some/file sent as a parameter of the function, so how could I accomplish that ?

I want a url of the following schema :
    url(r'downloads/(?P<path>\[Anything including backslashes])$', 'download_file'),

Thanks a lot.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/_cVverOl0AoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment