2010-06-17 21:14:30 +04:00
|
|
|
from django.conf.urls.defaults import patterns, url
|
2010-07-13 03:53:19 +04:00
|
|
|
from versions.feeds import VersionsRss
|
2010-06-17 21:14:30 +04:00
|
|
|
|
2010-12-22 02:45:02 +03:00
|
|
|
from addons.urls import ADDON_ID
|
2010-06-17 21:14:30 +04:00
|
|
|
from . import views
|
|
|
|
|
|
|
|
urlpatterns = patterns('',
|
2010-06-19 01:40:10 +04:00
|
|
|
url('^$', views.version_list, name='addons.versions'),
|
2010-07-13 03:53:19 +04:00
|
|
|
url('^format:rss$', VersionsRss(), name='addons.versions.rss'),
|
2010-06-22 02:58:28 +04:00
|
|
|
url('^(?P<version_num>[^/]+)$', views.version_detail,
|
2010-06-19 01:40:10 +04:00
|
|
|
name='addons.versions'),
|
2010-06-17 21:14:30 +04:00
|
|
|
)
|
2010-08-26 19:50:05 +04:00
|
|
|
|
|
|
|
download_patterns = patterns('',
|
|
|
|
# .* at the end to match filenames.
|
|
|
|
# /file/:id/type:attachment
|
2010-11-05 00:14:49 +03:00
|
|
|
url('^file/(?P<file_id>\d+)(?:/type:(?P<type>\w+))?(?:/.*)?',
|
2010-08-26 19:50:05 +04:00
|
|
|
views.download_file, name='downloads.file'),
|
|
|
|
|
|
|
|
# /latest/1865/type:xpi/platform:5
|
2010-12-22 02:45:02 +03:00
|
|
|
url('^latest/%s/(?:type:(?P<type>\w+)/)?'
|
|
|
|
'(?:platform:(?P<platform>\d+)/)?.*' % ADDON_ID,
|
2010-08-26 19:50:05 +04:00
|
|
|
views.download_latest, name='downloads.latest'),
|
|
|
|
)
|