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

3 4 5 6
from .views import (SomaDayArchiveView, SomaDayArchiveCsvView, RedirectTodayView,
        TrackDetailView, ArtistDetailView, ArtistListView, StatisticsView,
        UploadTracksView, RecentTracksView, QuickLinksView, SearchView, CleanupView,
        SearchCsvView, AddDiffusionView)
fred's avatar
fred committed
7 8 9

urlpatterns = [
    # Example: /2012/nov/10/
fred's avatar
fred committed
10
    url(r'^$', RedirectTodayView.as_view(), name='nonstop-today'),
fred's avatar
fred committed
11
    url(r'^stats/$', StatisticsView.as_view(), name='stats-view'),
fred's avatar
fred committed
12
    url(r'^tracks/(?P<pk>\d+)/$', TrackDetailView.as_view(), name='track-view'),
fred's avatar
fred committed
13
    url(r'^artists/$', ArtistListView.as_view(), name='artist-list'),
fred's avatar
fred committed
14
    url(r'^artists/(?P<pk>\d+)/$', ArtistDetailView.as_view(), name='artist-view'),
fred's avatar
fred committed
15 16 17
    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
18 19 20
    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
21 22

    url(r'^upload/$', UploadTracksView.as_view(), name='nonstop-upload-tracks'),
23
    url(r'^recent/$', RecentTracksView.as_view(), name='nonstop-recent-tracks'),
fred's avatar
fred committed
24
    url(r'^search/$', SearchView.as_view(), name='nonstop-search'),
25
    url(r'^search/csv$', SearchCsvView.as_view(), name='nonstop-search-csv'),
fred's avatar
fred committed
26
    url(r'^quick-links/$', QuickLinksView.as_view(), name='nonstop-quick-links'),
27
    url(r'^cleanup/$', CleanupView.as_view(), name='nonstop-cleanup'),
28 29 30

    # soma mangement for episodes
    url(r'^diffusion/(?P<pk>\d+)/add/$', AddDiffusionView.as_view(), name='nonstop-add-diffusion'),
fred's avatar
fred committed
31
]