Skip to content

Commit

Permalink
Merge pull request #705 from petridishdev/paging
Browse files Browse the repository at this point in the history
Results paging fix
  • Loading branch information
WadeBarnes authored Oct 25, 2021
2 parents 3c57951 + 800fe4b commit c08ee1c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ services:
- RTI_RAISE_ERRORS=${RTI_RAISE_ERRORS}
- RANDOM_ERRORS=${RANDOM_ERRORS}
- STARTUP_DELAY=${STARTUP_DELAY}
- PAGE_SIZE=${PAGE_SIZE}
- MAX_PAGE_SIZE=${MAX_PAGE_SIZE}
volumes:
- ../server/vcr-server/subscriptions:/home/indy/subscriptions
- ../server/vcr-server/agent_webhooks:/home/indy/agent_webhooks
Expand Down
3 changes: 3 additions & 0 deletions docker/manage
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ configureEnvironment() {
export SP_TRACKING_EMITTER=${SP_TRACKING_EMITTER:-spm.apps.gov.bc.ca}
export SP_TRACKING_EMITTER_PROTOCOL=${SP_TRACKING_EMITTER_PROTOCOL:-https}

export PAGE_SIZE=${PAGE_SIZE:-10}
export MAX_PAGE_SIZE=${MAX_PAGE_SIZE:-200}

# rabbitmq
export RABBITMQ_USER="RABBITMQ_USER"
export RABBITMQ_PASSWORD="RABBITMQ_PASSWORD"
Expand Down
4 changes: 2 additions & 2 deletions server/vcr-server/vcr_server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def parse_bool(val):
REST_FRAMEWORK = {
# "DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.NamespaceVersioning",
"DEFAULT_PAGINATION_CLASS": "vcr_server.pagination.EnhancedPageNumberPagination",
"PAGE_SIZE": 100,
"MAX_PAGE_SIZE": 200,
"PAGE_SIZE": int(os.getenv("PAGE_SIZE", "10")),
"MAX_PAGE_SIZE": int(os.getenv("MAX_PAGE_SIZE", "200")),
"DEFAULT_AUTHENTICATION_CLASSES": authentication.defaults(),
"DEFAULT_PERMISSION_CLASSES": [
"rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly"
Expand Down

0 comments on commit c08ee1c

Please sign in to comment.