source: telemeta/urls.py @ 6d9a741

cremcrem2crem3devdev2diademsdj1.6feature/breadcrumbsfeature/ts-0.5feature/ts-0.5.4feature/writecacheformagenericinstru_searchlamlam2mapsv3mergenlivemultiproductionrelease/1.4.4sabiodsearchsecurityserversocialstoragetelecastertestvideo
Last change on this file since 6d9a741 was 6d9a741, checked in by olivier <>, 8 years ago
  • coupled the web interface with the export layer
  • improved collections and items browsing
  • minor CSS improvements
  • now using Django typical models instead of "dynamic" ones
  • made simple models based on Dublin Core elements
  • Property mode set to 100644
File size: 1.3 KB
Line 
1from django.conf.urls.defaults import *
2from telemeta.models import MediaItem, MediaCollection
3
4all_items = {
5    'queryset': MediaItem.objects.all(),
6}
7
8all_collections = {
9    'queryset': MediaCollection.objects.all(),
10}
11
12urlpatterns = patterns('',
13    (r'^$', 'telemeta.views.web.index'),
14    (r'^items/$', 'django.views.generic.list_detail.object_list', 
15        dict(all_items, paginate_by=10, template_name="mediaitem_list.html")),
16    (r'^items/(?P<item_id>[0-9]+)/$', 'telemeta.views.web.item_detail'),
17    (r'^items/(?P<item_id>[0-9]+)/download/(?P<format>[0-9A-Z]+)/$', 
18        'telemeta.views.web.item_export'),
19    #(r'^media_item/(?P<media_item_id>[0-9]+)/$', 'telemeta.views.web.media_item_edit'),
20    (r'^media_item/(?P<media_item_id>[0-9]+)/update/$', 'telemeta.views.web.media_item_update'),
21
22    (r'^collections/$', 'django.views.generic.list_detail.object_list',
23        dict(all_collections, paginate_by=10, template_name="collection_list.html")),
24    (r'^collections/(?P<object_id>[0-9]+)/$', 
25        'django.views.generic.list_detail.object_detail',
26        dict(all_collections, template_name="collection_detail.html")),
27
28
29    # CSS (FIXME: for developement only)
30    (r'^css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': './telemeta/css'}),
31)
32
33
Note: See TracBrowser for help on using the repository browser.