Пример #1
0
 def dispatch(self, request, *args, **kwargs):
     return CommentDelete.dispatch(self, request, *args, **kwargs)
Пример #2
0
 def dispatch(self, request, *args, **kwargs):
     return CommentDelete.dispatch(self, request, *args, **kwargs)
Пример #3
0
        {
         'extra_context': {'page_title': 'Восстановление пароля: пароль восстановлен'}
         },
        ),
)
# AJAX
urlpatterns += patterns('', (r'^ajax/', include('ponyFiction.ajax.urls')))

# Работа с комментариями
urlpatterns += patterns('',
    # Добавление
    url(r'^story/(?P<story_id>\d+)/comment/add/$', CommentAdd.as_view(), name='comment_add'),
    # Редактирование
    url(r'^story/(?P<story_id>\d+)/comment/(?P<pk>\d+)/edit/$', CommentEdit.as_view(), name='comment_edit'),
    # Удаление
    url(r'^story/(?P<story_id>\d+)/comment/(?P<pk>\d+)/delete/$', CommentDelete.as_view(), name='comment_delete'),

)

# RSS
urlpatterns += patterns('',
    url(r'^feeds/stories/$', feeds.stories(), name='feeds_stories'),
    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'),
    # Просмотр с подгрузкой определенной страницы комментариев