예제 #1
0
 def setUp(self):
     '''Instantiate objects needed to test create and list view.'''
     self.factory = APIRequestFactory()
     self.user = User.objects.create(username='******',
                                     email='*****@*****.**',
                                     password="******")
     self.view = PageList.as_view()
예제 #2
0
from django.urls import path

# from api.views import QuestionList, QuestionDetail
from api.views import PageList, PageDetail

# urlpatterns = [
#     path('wiki/', QuestionList.as_view(), name='wiki_list'),
#     path('wiki/<int:pk>', QuestionDetail.as_view(), name='wiki_detail')
# ]

urlpatterns = [
    path('', PageList.as_view(), name='wiki-list-page'),
    path('<str:slug>/', PageDetail.as_view(), name='wiki-details-page'),
]
예제 #3
0
from django.urls import path

from api.views import PageList, PageDetail

urlpatterns = [
    path('pages/', PageList.as_view(), name='page_list'),
    path('pages/<int:pk>', PageDetail.as_view(), name='page_detail')
]

예제 #4
0
from django.urls import path

from api.views import PageList

urlpatterns = [
    path('wiki/', PageList.as_view(), name='wiki_list'),
]
예제 #5
0
from django.urls import path

from api.views import PageList, PageDetail

urlpatterns = [
    path('wiki', PageList.as_view(), name='page_list'),
    path('wiki/<int:pk>', PageDetail.as_view(), name='page_detail'),
]