Ejemplo n.º 1
0
]

community_posts_patterns = [
    path('', CommunityPosts.as_view(), name='community-posts'),
    path('closed/',
         ClosedCommunityPosts.as_view(),
         name='closed-community-posts'),
    path('count/',
         GetCommunityPostsCount.as_view(),
         name='community-posts-count'),
]

community_banned_users_patterns = [
    path('', CommunityBannedUsers.as_view(), name='community-banned-users'),
    path('search/',
         SearchCommunityBannedUsers.as_view(),
         name='search-community-banned-users'),
    path('ban/', BanUser.as_view(), name='community-ban-user'),
    path('unban/', UnbanUser.as_view(), name='community-unban-user'),
]

community_moderated_objects_patterns = [
    path('',
         CommunityModeratedObjects.as_view(),
         name='community-moderated-objects')
]

community_patterns = [
    path('', CommunityItem.as_view(), name='community'),
    path('avatar/', CommunityAvatar.as_view(), name='community-avatar'),
    path('cover/', CommunityCover.as_view(), name='community-cover'),
Ejemplo n.º 2
0
community_members_patterns = [
    path('', CommunityMembers.as_view(), name='community-members'),
    path('search/', SearchCommunityMembers.as_view(), name='search-community-members'),
    path('join/', JoinCommunity.as_view(), name='community-join'),
    path('leave/', LeaveCommunity.as_view(), name='community-leave'),
    path('invite/', InviteCommunityMember.as_view(), name='community-invite'),
    path('uninvite/', UninviteCommunityMember.as_view(), name='community-uninvite'),
]

community_posts_patterns = [
    path('', CommunityPosts.as_view(), name='community-posts'),
]

community_banned_users_patterns = [
    path('', CommunityBannedUsers.as_view(), name='community-banned-users'),
    path('search/', SearchCommunityBannedUsers.as_view(), name='search-community-banned-users'),
    path('ban/', BanUser.as_view(), name='community-ban-user'),
    path('unban/', UnbanUser.as_view(), name='community-unban-user'),
]

community_patterns = [
    path('', CommunityItem.as_view(), name='community'),
    path('avatar/', CommunityAvatar.as_view(), name='community-avatar'),
    path('cover/', CommunityCover.as_view(), name='community-cover'),
    path('favorite/', FavoriteCommunity.as_view(), name='favorite-community'),
    path('members/', include(community_members_patterns)),
    path('posts/', include(community_posts_patterns)),
    path('banned-users/', include(community_banned_users_patterns)),
    path('administrators/', include(community_administrators_patterns)),
    path('moderators/', include(community_moderators_patterns)),
]