urls.py 1.15 KB
Newer Older
fred's avatar
fred committed
1 2
from django.conf.urls import url

fred's avatar
fred committed
3
from .views import SomaDayArchiveView, SomaDayArchiveCsvView, RedirectTodayView, TrackDetailView, ArtistDetailView, ArtistListView, StatisticsView, UploadTracksView, RecentTracksView, QuickLinksView
fred's avatar
fred committed
4 5 6

urlpatterns = [
    # Example: /2012/nov/10/
fred's avatar
fred committed
7
    url(r'^$', RedirectTodayView.as_view(), name='nonstop-today'),
fred's avatar
fred committed
8
    url(r'^stats/$', StatisticsView.as_view(), name='stats-view'),
fred's avatar
fred committed
9
    url(r'^tracks/(?P<pk>\d+)/$', TrackDetailView.as_view(), name='track-view'),
fred's avatar
fred committed
10
    url(r'^artists/$', ArtistListView.as_view(), name='artist-list'),
fred's avatar
fred committed
11
    url(r'^artists/(?P<pk>\d+)/$', ArtistDetailView.as_view(), name='artist-view'),
fred's avatar
fred committed
12 13 14
    url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/(?P<day>[0-9]+)/$',
        SomaDayArchiveView.as_view(),
        name="archive_day"),
fred's avatar
fred committed
15 16 17
    url(r'^(?P<year>[0-9]{4})/(?P<month>[-\w]+)/(?P<day>[0-9]+)/csv$',
        SomaDayArchiveCsvView.as_view(),
        name="archive_day_csv"),
fred's avatar
fred committed
18 19

    url(r'^upload/$', UploadTracksView.as_view(), name='nonstop-upload-tracks'),
20
    url(r'^recent/$', RecentTracksView.as_view(), name='nonstop-recent-tracks'),
fred's avatar
fred committed
21
    url(r'^quick-links/$', QuickLinksView.as_view(), name='nonstop-quick-links'),
fred's avatar
fred committed
22
]