Exemplo n.º 1
0
from bumerang.apps.utils.views import (XMLDetailView, ObjectsDeleteView,
    AjaxRatingView)
from bumerang.apps.video.albums.views import VideoAlbumDetailView
from bumerang.apps.video.views import VideoListAjaxView
from models import Video
from albums.models import VideoAlbum
from views import (VideoListView, VideoCreateView, VideoDetailView,
    VideoUpdateView, VideoMoveView)
from albums.views import (VideoAlbumCreateView, VideoSetCoverView,
    VideoAlbumUpdateView)


urlpatterns = patterns('',
    url(r'^$',
        VideoListView.as_view(),
        name='video-list'
    ),
    url(r'^~(?P<category>[\w\-]+)/$',
        VideoListView.as_view(),
        name='video-list-category'
    ),

    # AJAX video list
    url(r'^ajax/(?P<pk>[\d]+)/$',
        VideoListAjaxView.as_view(),
        name='video-list-ajax'
    ),

    url(r'^album/add/$',
        login_required(VideoAlbumCreateView.as_view()),
Exemplo n.º 2
0
# encoding: utf-8
from django.conf.urls import patterns, url
from views import (
        VideoCreateView, VideoDeleteView, VideoListView,
        )

urlpatterns = patterns('',
    url(r'^new/$', VideoCreateView.as_view(), name='video-new'),
    url(r'^delete/(?P<pk>\d+)$', VideoDeleteView.as_view(), name='video-delete'),
    url(r'^view/$', VideoListView.as_view(), name='video-view'),
)
Exemplo n.º 3
0
#encoding: UTF-8
from django.conf.urls import patterns, url
from django.utils.translation import ugettext
from models import Video
from views import VideoListView, videoListApproveAjaxView

video_list_view = VideoListView(queryset=Video.objects.all().order_by(
    'reviewed', '-published'),
                                paginate_by=50,
                                extra_context={'title': ugettext('Videos')})

urlpatterns = patterns(
    '',
    url(r'^$', video_list_view, name='video-list'),
    url(r'^approve_ajax/', videoListApproveAjaxView),
)