Skip to content

Commit

Permalink
add CustomBrowsableAPI to dev, stage and prod
Browse files Browse the repository at this point in the history
Issue: AAH-2733
  • Loading branch information
jerabekjiri committed Oct 11, 2023
1 parent f896dc0 commit eae2013
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/etc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# main galaxy_ng/app/settings.py file.
# Split the configuration if necessary.
import os
import re


DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
Expand Down Expand Up @@ -41,6 +42,12 @@

REST_FRAMEWORK__DEFAULT_RENDERER_CLASSES = ['rest_framework.renderers.JSONRenderer']

# add CustomBrowsableAPI only for community (galaxy.ansible.com, galaxy-stage, galaxy-dev)"
if re.search(r'galaxy(-dev|-stage)*.ansible.com', os.environ.get('PULP_CONTENT_ORIGIN', "")):
REST_FRAMEWORK__DEFAULT_RENDERER_CLASSES.append(
'galaxy_ng.app.renderers.CustomBrowsableAPIRenderer'
)

_enabled_handlers = ['console']
_extra_handlers = {}

Expand Down

0 comments on commit eae2013

Please sign in to comment.