コード例 #1
0
    path('', PostItem.as_view(), name='post'),
    path('notifications/', include(post_notifications_patterns)),
    path('comments/', PostComments.as_view(), name='post-comments'),
    path('comments/disable/',
         PostCommentsDisable.as_view(),
         name='disable-post-comments'),
    path('comments/enable/',
         PostCommentsEnable.as_view(),
         name='enable-post-comments'),
    path('comments/<int:post_comment_id>/', include(post_comment_patterns)),
    path('reactions/', PostReactions.as_view(), name='post-reactions'),
    path('reactions/emoji-count/',
         PostReactionsEmojiCount.as_view(),
         name='post-reactions-emoji-count'),
    path('reactions/<int:post_reaction_id>/',
         PostReactionItem.as_view(),
         name='post-reaction'),
    path('close/', PostClose.as_view(), name='close-post'),
    path('open/', PostOpen.as_view(), name='open-post'),
    path('report/', ReportPost.as_view(), name='report-post'),
    path('translate/', TranslatePost.as_view(), name='translate-post'),
    path('publish/', PublishPost.as_view(), name='publish-post'),
    path('status/', PostStatus.as_view(), name='post-status'),
    path('link-preview/',
         PostPreviewLinkData.as_view(),
         name='preview-post-link'),
    path('participants/', include(post_participants_patterns)),
    path('media/', include(post_media_patterns)),
]

posts_profile_patterns = [
コード例 #2
0
]

post_media_patterns = [
    path('', PostMedia.as_view(), name='post-media'),
]

post_patterns = [
    path('', PostItem.as_view(), name='post'),
    path('notifications/', include(post_notifications_patterns)),
    path('comments/', PostComments.as_view(), name='post-comments'),
    path('comments/disable/', PostCommentsDisable.as_view(), name='disable-post-comments'),
    path('comments/enable/', PostCommentsEnable.as_view(), name='enable-post-comments'),
    path('comments/<int:post_comment_id>/', include(post_comment_patterns)),
    path('reactions/', PostReactions.as_view(), name='post-reactions'),
    path('reactions/emoji-count/', PostReactionsEmojiCount.as_view(), name='post-reactions-emoji-count'),
    path('reactions/<int:post_reaction_id>/', PostReactionItem.as_view(), name='post-reaction'),
    path('close/', PostClose.as_view(), name='close-post'),
    path('open/', PostOpen.as_view(), name='open-post'),
    path('report/', ReportPost.as_view(), name='report-post'),
    path('translate/', TranslatePost.as_view(), name='translate-post'),
    path('publish/', PublishPost.as_view(), name='publish-post'),
    path('status/', PostStatus.as_view(), name='post-status'),
    path('link-preview/', PostPreviewLinkData.as_view(), name='preview-post-link'),
    path('participants/', include(post_participants_patterns)),
    path('media/', include(post_media_patterns)),
]

posts_patterns = [
    path('<uuid:post_uuid>/', include(post_patterns)),
    path('', Posts.as_view(), name='posts'),
    path('trending/', TrendingPosts.as_view(), name='trending-posts'),