예제 #1
0
파일: urls.py 프로젝트: ynqasem/Phaylasoof
         name='api-following-user-list'),
    path('upvote/question/',
         UpvoteQuestionCreateView.as_view(),
         name='api-upvote-question'),
    path('upvote/question/list/<int:question_id>/',
         UpvoteQuestionListView.as_view(),
         name='api-upvote-question-list'),
    path('downvote/question/',
         DownvoteQuestionCreateView.as_view(),
         name='api-downvote-question'),
    path('downvote/question/list/<int:question_id>/',
         DownvoteQuestionListView.as_view(),
         name='api-downvote-question-list'),
    path('upvote/answer/',
         UpvoteAnswerCreateView.as_view(),
         name='api-upvote-answer'),
    path('upvote/answer/list/<int:answer_id>/',
         UpvoteAnswerListView.as_view(),
         name='api-upvote-answer-list'),
    path('downvote/answer/',
         DownvoteAnswerCreateView.as_view(),
         name='api-downvote-answer'),
    path('downvote/answer/list/<int:answer_id>/',
         DownvoteAnswerListView.as_view(),
         name='api-downvote-answer-list'),
    path('profile/<int:user_id>/', ProfileView.as_view(), name='api-profile'),
    path('user/list/', UserListView.as_view(), name='api-user_list'),
]

# path('feedpage/<int:user_id>/', FeedPageView.as_view(), name='api-feedpage'),
예제 #2
0
from django.conf.urls import include, url
from api.views import BookmarkListView, BookmarkDetailView, UserListView, UserDetailView, ClickListView, ClickDetailView

urlpatterns = [
    url(r'^bookmark/$', BookmarkListView.as_view(), name="api_bookmark_list"),
    url(r'^bookmark/(?P<pk>\d+)/$', BookmarkDetailView.as_view(), name="api_bookmark_detail"),
    url(r'^user/$', UserListView.as_view(), name="api_user_list"),
    url(r'^user/(?P<pk>\d+)/$', UserDetailView.as_view(), name="api_user_detail"),
    url(r'^click/$', ClickListView.as_view(), name="api_click_list"),
    url(r'^click/(?P<pk>\d+)/$', ClickDetailView.as_view(), name="api_click_detail"),
]
예제 #3
0
from django.conf.urls import include, url
from api.views import BookmarkListView, BookmarkDetailView, UserListView, UserDetailView, ClickListView, ClickDetailView

urlpatterns = [
    url(r'^bookmark/$', BookmarkListView.as_view(), name="api_bookmark_list"),
    url(r'^bookmark/(?P<pk>\d+)/$',
        BookmarkDetailView.as_view(),
        name="api_bookmark_detail"),
    url(r'^user/$', UserListView.as_view(), name="api_user_list"),
    url(r'^user/(?P<pk>\d+)/$',
        UserDetailView.as_view(),
        name="api_user_detail"),
    url(r'^click/$', ClickListView.as_view(), name="api_click_list"),
    url(r'^click/(?P<pk>\d+)/$',
        ClickDetailView.as_view(),
        name="api_click_detail"),
]
예제 #4
0
"""rest_api_django URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from rest_framework import routers
from api.views import MovieListView, MovieDetailView, UserListView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('movies', MovieListView.as_view()),
    path('movies/<int:pk>/', MovieDetailView.as_view()),
    path('user', UserListView.as_view())
]
예제 #5
0
파일: urls.py 프로젝트: Toyto/SpinOffHack
from django.conf.urls import url, include, patterns
from rest_framework import routers
from rest_framework.urlpatterns import format_suffix_patterns

from api.views import (
    PlayerListView, UserDetail, PlayerDetail, RoomDetail, RoomListView,
    UserListView, ReplicDetail, ReplicListView)

router = routers.DefaultRouter()


urlpatterns = patterns('SpinOH.api.views', 
    url(r'^', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^users/$', UserListView.as_view()),
    url(r'^players/$', PlayerListView.as_view(), name='players'),
    url(r'^rooms/$', RoomListView.as_view()),
    url(r'^replics/$', ReplicListView.as_view()),
    url(r'^users/(?P<pk>\d+)/$', UserDetail.as_view(), name='user-detail'),
    url(r'^players/(?P<pk>\d+)/$', PlayerDetail.as_view(), name='player-detail'),
    url(r'^rooms/(?P<pk>\d+)/$', RoomDetail.as_view(), name='room-detail'),
    url(r'^replics/(?P<pk>\d+)/$', ReplicDetail.as_view(), name='replic-detail'),
)
예제 #6
0
파일: urls.py 프로젝트: rbloor97/testapi
"""apiprueba URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from rest_framework.authtoken import views

from api.views import UserListView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include('api.urls', namespace='api')),
    path('api-token-auth/', UserListView.as_view())
]
예제 #7
0
from django.urls import path
from api.views import CarListView, UserListView
from rest_framework import routers

app_name = 'api'

router = routers.DefaultRouter()
router.register('cars', CarListView)

urlpatterns = [
    path('cars/', CarListView.as_view(), name='cars'),
    path('users/', UserListView.as_view(), name='users'),
    # path('users/<pk>/', UserCarsListView.as_view(), name = 'usercars'),
]
예제 #8
0
파일: urls.py 프로젝트: brendansudol/motley
from django.conf.urls import url
from rest_framework.authtoken import views

from api.views import LocationListView, UserListView

urlpatterns = [
    url(r'^token-auth', views.obtain_auth_token),
    url(r'^locations/$', LocationListView.as_view()),
    url(r'^users/$', UserListView.as_view()),
]