some parts of product - fix custom pagination - add id to pages list

This commit is contained in:
2025-06-07 09:18:27 +03:30
parent a6cd093665
commit 627acf05a1
41 changed files with 371 additions and 4 deletions

View File

@@ -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'
}

View File

@@ -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'),
]