from django.conf.urls import patterns, url from mkt.downloads import views urlpatterns = patterns('', # .* at the end to match filenames. # /file/:id/type:attachment url('^file/(?P\d+)(?:/type:(?P\w+))?(?:/.*)?', views.download_file, name='downloads.file'), )