Esempio n. 1
0
"""URLs for roles."""
from django.urls import path
from roles.views import BodyRoleViewSet

urlpatterns = [
    path('roles', BodyRoleViewSet.as_view({'post': 'create'})),
    path(
        'roles/<pk>',
        BodyRoleViewSet.as_view({
            'get': 'retrieve',
            'put': 'update',
            'delete': 'destroy'
        })),
]
Esempio n. 2
0
"""URLs for users."""
from django.urls import path

from roles.views import BodyRoleViewSet
from users.views import UserProfileViewSet

urlpatterns = [
    path('users/<pk>', UserProfileViewSet.as_view({
        'get': 'retrieve'
    })),

    path('user-me', UserProfileViewSet.as_view({
        'get': 'retrieve_me', 'put': 'update_me', 'patch': 'update_me'
    })),

    path('user-me/ues/<event_pk>', UserProfileViewSet.as_view({'get': 'set_ues_me'})),
    path('user-me/unr/<news_pk>', UserProfileViewSet.as_view({'get': 'set_unr_me'})),
    path('user-me/subscribe-wp', UserProfileViewSet.as_view({'post': 'subscribe_web_push'})),
    path('user-me/events', UserProfileViewSet.as_view({'get': 'get_my_events'})),
    path('user-me/roles', BodyRoleViewSet.as_view({'get': 'get_my_roles'})),
]
Esempio n. 3
0
    )),
    path('api/upload/<pk>', UploadViewSet.as_view(
        {'get':'retrieve', 'delete':'destroy'}
    )),

    path('api/login', LoginViewSet.as_view({'get':'login'})),
    path('api/login/get-user', LoginViewSet.as_view({'get':'get_user'})),
    path('api/logout', LoginViewSet.as_view({'get':'logout'})),

    path('api/user-me', UserProfileViewSet.as_view(
        {'get':'retrieve_me', 'put':'update_me', 'patch':'update_me'}
    )),
    path('api/user-me/ues/<event_pk>', UserProfileViewSet.as_view({'get':'set_ues_me'})),
    path('api/user-me/unr/<news_pk>', UserProfileViewSet.as_view({'get':'set_unr_me'})),
    path('api/user-me/events', UserProfileViewSet.as_view({'get':'get_my_events'})),
    path('api/user-me/roles', BodyRoleViewSet.as_view({'get':'get_my_roles'})),

    path('api/roles', BodyRoleViewSet.as_view(
        {'get':'list', 'post':'create'}
    )),
    path('api/roles/<pk>', BodyRoleViewSet.as_view(
        {'get':'retrieve', 'put':'update', 'delete':'destroy'}
    )),

    path('api/placement-blog', PlacementBlogViewset.as_view({'get':'placement_blog'})),
    path('api/training-blog', PlacementBlogViewset.as_view({'get':'training_blog'})),

    path('api/news', NewsFeedViewset.as_view({'get':'news_feed'})),

    path('api/mess', get_mess),