urls.py 905 B

123456789101112131415161718192021
  1. from django.conf.urls import include, url
  2. from django.conf.urls.static import static
  3. from . import views
  4. urlpatterns = [
  5. url(r'^$', views.IndexView.as_view(), name='media_list'),
  6. url(r'^tag/(?P<slug>[\w]+)/$', views.TagIndex.as_view(), name='tag_list'),
  7. url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='media_detail'),
  8. url(r'^(?P<pk>\d+)/edit/$', views.media_edit, name='media_edit'),
  9. url(r'^new/$', views.media_new, name='media_new'),
  10. url(r'^chunked_upload$', views.chunked_upload, name='chunked_upload'),
  11. url(r'^api/chunked_upload/?$', views.MediaChunkedUploadView.as_view(), name='api_chunked_upload'),
  12. url(r'^api/chunked_upload_complete/?$', views.MediaChunkedUploadCompleteView.as_view(), name='api_chunked_upload_complete'),
  13. url(r'^search/', include('haystack.urls')),
  14. ]
  15. urlpatterns += static('uploads/', document_root='uploads/', show_indexes=True)