Since the default settings.DEFAULT_REST_FRAMEWORK is now 2.0 and it has been on production for quite a long time, we should probably just clean up the versioning and the old pagination since it is unlikely to ever be used again.
- From config/settings/base.py
remove "DEFAULT_VERSION": env("REST_FRAMEWORK_DEFAULT_VERSION", default="2.0") & "ALLOWED_VERSIONS": ["1.0", "2.0"],
Change "DEFAULT_PAGINATION_CLASS": "documentcloud.core.pagination.VersionedPagination", to CursorPagination from the same file
Remove:
AUTH_PAGE_LIMIT = env.int("AUTH_PAGE_LIMIT", default=1000)
ANON_PAGE_LIMIT = env.int("ANON_PAGE_LIMIT", default=100)
Remove "DEFAULT_VERSIONING_CLASS": "documentcloud.core.versioning.QueryParameterVersioning",
- From DocumentCloud/core/pagination.py remove probably everything aside from CursorPagination
-For anon probably re-introduce a smaller page size cap
- Delete documentcloud/core/versioning.py
Since the default settings.DEFAULT_REST_FRAMEWORK is now 2.0 and it has been on production for quite a long time, we should probably just clean up the versioning and the old pagination since it is unlikely to ever be used again.
remove "DEFAULT_VERSION": env("REST_FRAMEWORK_DEFAULT_VERSION", default="2.0") & "ALLOWED_VERSIONS": ["1.0", "2.0"],
Change "DEFAULT_PAGINATION_CLASS": "documentcloud.core.pagination.VersionedPagination", to CursorPagination from the same file
Remove:
AUTH_PAGE_LIMIT = env.int("AUTH_PAGE_LIMIT", default=1000)
ANON_PAGE_LIMIT = env.int("ANON_PAGE_LIMIT", default=100)
Remove "DEFAULT_VERSIONING_CLASS": "documentcloud.core.versioning.QueryParameterVersioning",
-For anon probably re-introduce a smaller page size cap