from django.conf.urls.defaults import patterns, url from versions.feeds import VersionsRss from addons.urls import ADDON_ID from . import views urlpatterns = patterns('', url('^$', views.version_list, name='addons.versions'), url('^format:rss$', VersionsRss(), name='addons.versions.rss'), url('^(?P[^/]+)$', views.version_detail, name='addons.versions'), ) download_patterns = patterns('', # .* at the end to match filenames. # /file/:id/type:attachment url('^file/(?P\d+)(?:/type:(?P\w+))?(?:/.*)?', views.download_file, name='downloads.file'), # /latest/1865/type:xpi/platform:5 url('^latest/%s/(?:type:(?P\w+)/)?' '(?:platform:(?P\d+)/)?.*' % ADDON_ID, views.download_latest, name='downloads.latest'), )