Skip to content

Commit

Permalink
add SODAR_API_PAGE_SIZE to siteinfo (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Jan 3, 2025
1 parent e829b7e commit f7727c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
19 changes: 13 additions & 6 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,21 @@
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = False


# API Settings
# ------------------------------------------------------------------------------

# SODAR API host URL
SODAR_API_DEFAULT_HOST = env.url(
'SODAR_API_DEFAULT_HOST', 'http://0.0.0.0:8000'
)
# SODAR API pagination page size
SODAR_API_PAGE_SIZE = env.int('SODAR_API_PAGE_SIZE', 100)


# Django REST framework
# ------------------------------------------------------------------------------


REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
Expand All @@ -330,7 +342,7 @@
'DEFAULT_PAGINATION_CLASS': (
'rest_framework.pagination.PageNumberPagination'
),
'PAGE_SIZE': env.int('SODAR_API_PAGE_SIZE', 100),
'PAGE_SIZE': SODAR_API_PAGE_SIZE,
}

# Additional authentication settings
Expand Down Expand Up @@ -557,11 +569,6 @@ def set_logging(level=None):
],
)

# SODAR API host URL
SODAR_API_DEFAULT_HOST = env.url(
'SODAR_API_DEFAULT_HOST', 'http://0.0.0.0:8000'
)


# Projectroles app settings

Expand Down
1 change: 1 addition & 0 deletions siteinfo/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
'SOCIAL_AUTH_OIDC_KEY',
'SOCIAL_AUTH_OIDC_USERNAME_KEY',
'SODAR_API_DEFAULT_HOST',
'SODAR_API_PAGE_SIZE',
'STATICFILES_DIRS',
'STATICFILES_FINDERS',
'TEMPLATES',
Expand Down

0 comments on commit f7727c7

Please sign in to comment.