Merge branch 'feature/back-collections-list' into 'develop'

remove pagination

See merge request gm/gm-backend!248
This commit is contained in:
Anton Gorbunov 2020-01-30 10:37:22 +00:00
commit ab8a4845d8
2 changed files with 6 additions and 1 deletions

View File

@ -7,8 +7,8 @@ from collection.views import back as views
app_name = 'collection' app_name = 'collection'
router = SimpleRouter() router = SimpleRouter()
router.register(r'collections\/all', views.CollectionBackOfficeList)
router.register(r'collections', views.CollectionBackOfficeViewSet) router.register(r'collections', views.CollectionBackOfficeViewSet)
urlpatterns = [ urlpatterns = [
path('guides/', views.GuideListCreateView.as_view(), path('guides/', views.GuideListCreateView.as_view(),
name='guide-list-create'), name='guide-list-create'),

View File

@ -94,6 +94,11 @@ class CollectionBackOfficeViewSet(mixins.CreateModelMixin,
collection.products.remove(related_object) collection.products.remove(related_object)
class CollectionBackOfficeList(CollectionBackOfficeViewSet):
"""ViewSet for Collections list for BackOffice users and Collection create."""
pagination_class = None
class GuideListCreateView(GuideBaseView, class GuideListCreateView(GuideBaseView,
generics.ListCreateAPIView): generics.ListCreateAPIView):
"""View for Guides list for BackOffice users and Guide create.""" """View for Guides list for BackOffice users and Guide create."""