2011-04-13 08:50:24 +02:00
|
|
|
from django.conf.urls.defaults import *
|
2011-08-25 15:39:54 +02:00
|
|
|
from feeds import *
|
|
|
|
|
2012-04-04 17:31:54 +02:00
|
|
|
package_patterns = patterns('djeuscan.views',
|
2011-08-25 15:39:54 +02:00
|
|
|
url(r'^(?P<category>[\w+][\w+.-]*)/(?P<package>[\w+][\w+.-]*)/feed/$', PackageFeed(), name='package_feed'),
|
|
|
|
(r'^(?P<category>[\w+][\w+.-]*)/(?P<package>[\w+][\w+.-]*)/$', 'package'),
|
|
|
|
)
|
|
|
|
|
2012-04-04 17:31:54 +02:00
|
|
|
categories_patterns = patterns('djeuscan.views',
|
2011-09-21 10:12:01 +02:00
|
|
|
(r'^(?P<category>[\w+][\w+.-]*)/(view/)?$', 'category'),
|
2011-08-26 13:27:46 +02:00
|
|
|
url(r'^(?P<category>[\w+][\w+.-]*)/feed/$', CategoryFeed(), name='category_feed'),
|
|
|
|
(r'^(?P<category>[\w+][\w+.-]*)/charts/(?P<chart>[\w\-]+).png$', 'chart_category'),
|
|
|
|
(r'^$', 'categories'),
|
2011-08-25 15:39:54 +02:00
|
|
|
)
|
|
|
|
|
2012-04-04 17:31:54 +02:00
|
|
|
herds_patterns = patterns('djeuscan.views',
|
2011-09-21 10:12:01 +02:00
|
|
|
(r'^(?P<herd>[\@\{\}\w+.-]*)/(view/)?$', 'herd'),
|
2011-08-26 13:27:46 +02:00
|
|
|
url(r'^(?P<herd>[\@\{\}\w+.-]*)/feed/$', HerdFeed(), name='herd_feed'),
|
|
|
|
(r'^(?P<herd>[\@\{\}\w+.-]*)/charts/(?P<chart>[\w\-]+).png$', 'chart_herd'),
|
|
|
|
(r'^$', 'herds'),
|
2011-08-25 15:39:54 +02:00
|
|
|
)
|
|
|
|
|
2012-04-04 17:31:54 +02:00
|
|
|
maintainers_patterns = patterns('djeuscan.views',
|
2011-09-21 10:12:01 +02:00
|
|
|
(r'^(?P<maintainer_id>\d+)/(view/)?$', 'maintainer'),
|
2011-08-26 13:27:46 +02:00
|
|
|
url(r'^(?P<maintainer_id>\d+)/feed/$', MaintainerFeed(), name='maintainer_feed'),
|
|
|
|
(r'^(?P<maintainer_id>\d+)/charts/(?P<chart>[\w\-]+).png$', 'chart_maintainer'),
|
|
|
|
(r'^$', 'maintainers'),
|
2011-08-25 15:39:54 +02:00
|
|
|
)
|
2011-04-13 08:50:24 +02:00
|
|
|
|
2012-04-04 17:31:54 +02:00
|
|
|
overlays_patterns = patterns('djeuscan.views',
|
2011-11-23 18:03:07 +01:00
|
|
|
(r'^(?P<overlay>[\w+][\w+.-]*)/(view/)?$', 'overlay'),
|
|
|
|
(r'^$', 'overlays'),
|
|
|
|
)
|
|
|
|
|
2012-04-04 17:31:54 +02:00
|
|
|
urlpatterns = patterns('djeuscan.views',
|
2011-11-15 17:08:29 +01:00
|
|
|
# Global stuff
|
2012-04-04 17:31:54 +02:00
|
|
|
(r'^api/', include('djeuscan.api.urls')),
|
|
|
|
|
2011-04-13 08:50:24 +02:00
|
|
|
(r'^$', 'index'),
|
2011-08-25 15:39:54 +02:00
|
|
|
url(r'^feed/$', GlobalFeed(), name='global_feed'),
|
2011-04-25 22:27:32 +02:00
|
|
|
(r'^about/$', 'about'),
|
2011-11-17 14:37:59 +01:00
|
|
|
(r'^about/api$', 'api'),
|
2011-04-25 22:27:32 +02:00
|
|
|
(r'^statistics/$', 'statistics'),
|
|
|
|
(r'^statistics/charts/(?P<chart>[\w\-]+).png$', 'chart'),
|
2011-04-15 19:28:37 +02:00
|
|
|
(r'^world/$', 'world'),
|
|
|
|
(r'^world/scan/$', 'world_scan'),
|
2011-11-15 17:08:29 +01:00
|
|
|
|
|
|
|
# Real data
|
2011-08-25 15:39:54 +02:00
|
|
|
(r'^categories/', include(categories_patterns)),
|
|
|
|
(r'^herds/', include(herds_patterns)),
|
|
|
|
(r'^maintainers/', include(maintainers_patterns)),
|
2011-11-23 18:03:07 +01:00
|
|
|
(r'^overlays/', include(overlays_patterns)),
|
2011-08-25 15:39:54 +02:00
|
|
|
(r'^package/', include(package_patterns)),
|
2011-04-13 08:50:24 +02:00
|
|
|
)
|