Exemplo n.º 1
0
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from profiles.api.views import (ProfileViewSet, ProfileStatusViewSet,
                                AvatarUpdateView)

# profile_list = ProfileViewSet.as_view({"get": "list"})
# profile_detail = ProfileViewSet.as_view({"get": "retrieve"})

router = DefaultRouter()
router.register(r"profiles", ProfileViewSet)
router.register(r"status", ProfileStatusViewSet, basename="status")

urlpatterns = [
    path("", include(router.urls)),
    path("avatar/", AvatarUpdateView.as_view(), name="avatar-update")
    # path("profiles/", profile_list, name="profile-list"),
    # path("profiles/<int:pk>/", profile_detail, name="profile-detail")
]
Exemplo n.º 2
0
router = DefaultRouter()
router.register(r'profiles', ProfileViewSet)
router.register(r'status', ProfileStatusViewSet, basename='status')

# profile_list = ProfileViewSet.as_view({'get': 'list'})
# profile_detail = ProfileViewSet.as_view({'get': 'retrieve'})

urlpatterns = [
    # path(
    #     'profiles/',
    #     ProfileListView.as_view(),
    #     name='profile_list',
    # ),
    # path(
    #     'profiles/',
    #     profile_list,
    #     name='profile_list',
    # ),
    # path(
    #     'profiles/<int:pk>/',
    #     profile_detail,
    #     name='profile_detail',
    # ),
    path('', include(router.urls)),
    path(
        'avatar/',
        AvatarUpdateView.as_view(),
        name='avatar_update',
    ),
]
Exemplo n.º 3
0
from django.urls import path, include
from profiles.api.views import ProfileViewSet, ProfileStatusViewSet, AvatarUpdateView
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register('profiles', ProfileViewSet)
router.register('status', ProfileStatusViewSet, basename='status')

urlpatterns = [
    path('', include(router.urls)),
    path('avatar/', AvatarUpdateView.as_view(), name='avtar')
]
Exemplo n.º 4
0
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from profiles.api.views import (ProfileViewSet, ProfileStatusViewset,
                                AvatarUpdateView)

router = DefaultRouter()
router.register(r'profiles', ProfileViewSet)
router.register(r'status', ProfileStatusViewset, basename='status')

urlpatterns = [
    path('', include(router.urls)),
    path('avatar', AvatarUpdateView.as_view(), name='avatar-update')
]
Exemplo n.º 5
0
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from profiles.api.views import (ProfileViewSet,
                                ProfileStatusViewSet,
                                AvatarUpdateView)

# profile_list = ProfileViewSet.as_view({"get": "list"})
# profile_detail = ProfileViewSet.as_view({"get": "retrieve"})

router = DefaultRouter()
router.register(r"profiles", ProfileViewSet)
router.register(r"status", ProfileStatusViewSet, basename="status")


urlpatterns = [
    path("", include(router.urls)),
    path("avatar/", AvatarUpdateView.as_view(), name='update-avatar')
    # path('profiles/', profile_list, name='profile-list'),
    # path('profiles/<int:pk>/', profile_detail, name='profile-detail')
]