Skip to content

Commit

Permalink
Merge pull request #449 from xchem/m2ms-1077-legacy-url
Browse files Browse the repository at this point in the history
Adds 'legacy_url' to DJANGO_CONTEXT
  • Loading branch information
alanbchristie authored Nov 21, 2023
2 parents 520ecb9 + 2f9426f commit 3bb7747
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fragalysis/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@
# dedicated Discourse server.
DISCOURSE_DEV_POST_SUFFIX = os.environ.get("DISCOURSE_DEV_POST_SUFFIX", '')

# An optional URL that identifies the URL to a prior stack.
# If set, it's typically something like "https://fragalysis.diamond.ac.uk".
# It can be blank, indicating there is no legacy service.
LEGACY_URL = os.environ.get("LEGACY_URL", "")

SQUONK2_MEDIA_DIRECTORY = "fragalysis-files"
SQUONK2_INSTANCE_API = "data-manager-ui/results/instance/"

Expand Down
4 changes: 4 additions & 0 deletions viewer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ def react(request):

context = {}

# Legacy URL (a n optional prior stack)
# May be blank ('')
context['legacy_url'] = settings.LEGACY_URL

# Is the Squonk2 Agent configured?
logger.info("Checking whether Squonk2 is configured...")
sq2_rv = _SQ2A.configured()
Expand Down

0 comments on commit 3bb7747

Please sign in to comment.