Exemplo n.º 1
0
 def dispatch(self, request, *args, **kwargs):
     return StoryDelete.dispatch(self, request, *args, **kwargs)
Exemplo n.º 2
0
 def dispatch(self, request, *args, **kwargs):
     return StoryDelete.dispatch(self, request, *args, **kwargs)
Exemplo n.º 3
0
    url(r'^feeds/chapters/$', feeds.chapters(), name='feeds_chapters'),
    url(r'^feeds/story/(?P<story_id>\d+)/$', feeds.story(), name='feeds_story'),
)

# Работа с рассказами
urlpatterns += patterns('ponyFiction.views.story',
    # Просмотр
    url(r'^story/(?P<pk>\d+)/$', 'story_view', {'comments_page': 1}, name='story_view'),
    # Просмотр с подгрузкой определенной страницы комментариев
    url(r'^story/(?P<pk>\d+)/comments/page/(?P<comments_page>\d+)/$', 'story_view', name='story_view_comments_paged'),
    # Добавление
    url(r'^story/add/$', StoryAdd.as_view(), name='story_add'),
    # Правка
    url(r'^story/(?P<pk>\d+)/edit/$', StoryEdit.as_view(), name='story_edit'),
    # Удаление
    url(r'^story/(?P<pk>\d+)/delete/$', StoryDelete.as_view(), name='story_delete'),
    # Отправка на публикацию
    url(r'^story/(?P<pk>\d+)/publish/$', 'story_publish', name='story_publish'),
    # Одобрение
    url(r'^story/(?P<pk>\d+)/approve/$', 'story_approve', name='story_approve'),
    # Добавление в избранное
    url(r'^story/(?P<pk>\d+)/favorite$', 'story_favorite', name='story_favorite'),
    # Добавление в закладки
    url(r'^story/(?P<pk>\d+)/bookmark$', 'story_bookmark', name='story_bookmark'),
    # Голосование за рассказ
    url(r'^story/(?P<pk>\d+)/vote/plus/$', 'story_vote', {'direction': True}, name='story_vote_plus'),
    url(r'^story/(?P<pk>\d+)/vote/minus/$', 'story_vote', {'direction': False}, name='story_vote_minus'),
    # Загрузка рассказа
    url(r'^story/(?P<story_id>\d+)/download/(?P<filename>\w+)\.(?P<extension>[\w\.]+)$', 'story_download'),
)
# Работа с главами