some parts of product - fix custom pagination - add id to pages list
This commit is contained in:
@@ -66,6 +66,7 @@ INSTALLED_APPS = [
|
||||
'apps.warehouse.apps.WarehouseConfig',
|
||||
'apps.search.apps.SearchConfig',
|
||||
'apps.log.apps.LogConfig',
|
||||
'apps.product.apps.ProductConfig',
|
||||
'rest_captcha',
|
||||
'captcha',
|
||||
'drf_yasg'
|
||||
@@ -155,8 +156,8 @@ REST_FRAMEWORK = {
|
||||
'rest_framework.authentication.BasicAuthentication',
|
||||
),
|
||||
'EXCEPTION_HANDLER': 'apps.core.error_handler.custom_exception_handler',
|
||||
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
|
||||
"PAGE_SIZE": 25,
|
||||
"DEFAULT_PAGINATION_CLASS": 'apps.core.pagination.CustomPageNumberPagination',
|
||||
"PAGE_SIZE": 20,
|
||||
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema'
|
||||
}
|
||||
|
||||
|
||||
@@ -37,5 +37,6 @@ urlpatterns = [
|
||||
path('livestock/', include('apps.livestock.urls')),
|
||||
path('tag/', include('apps.tag.urls')),
|
||||
path('search/', include('apps.search.urls')),
|
||||
path('product/', include('apps.product.urls')),
|
||||
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user