From 25482954f473061ef3d480512a4b26c119036874 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 26 Sep 2018 21:19:21 -0700 Subject: have domain URLs be configurable --- python/config.py | 6 ++++-- python/fatcat/templates/base.html | 6 +++--- python/fatcat/templates/container_view.html | 2 +- python/fatcat/templates/creator_view.html | 2 +- python/fatcat/templates/file_view.html | 2 +- python/fatcat/templates/home.html | 2 +- python/fatcat/templates/release_view.html | 2 +- python/fatcat/templates/work_view.html | 2 +- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/python/config.py b/python/config.py index 684734f0..cb2c7bf0 100644 --- a/python/config.py +++ b/python/config.py @@ -8,9 +8,11 @@ class Config(object): SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URI') or \ 'sqlite:///' + os.path.join(basedir, 'fatcat_dev.sqlite') SQLALCHEMY_TRACK_MODIFICATIONS = False - ELASTIC_BACKEND = "http://search.qa.fatcat.wiki:8088" - ELASTIC_INDEX = "crossref-works" GIT_REVISION = subprocess.check_output(["git", "describe", "--always"]).strip() + # This is, effectively, the QA/PROD flag + FATCAT_DOMAIN = "qa.fatcat.wiki" + ELASTIC_INDEX = "crossref-works" + ELASTIC_BACKEND = "http://search.{}:8088".format(FATCAT_DOMAIN) # "Event more verbose" debug options. SECRET_KEY is bogus. #SQLALCHEMY_ECHO = True diff --git a/python/fatcat/templates/base.html b/python/fatcat/templates/base.html index bc2b680f..617450c2 100644 --- a/python/fatcat/templates/base.html +++ b/python/fatcat/templates/base.html @@ -23,7 +23,7 @@ fatcat! About - Guide + Guide
diff --git a/python/fatcat/templates/creator_view.html b/python/fatcat/templates/creator_view.html index 25a4f61a..2ce01fb6 100644 --- a/python/fatcat/templates/creator_view.html +++ b/python/fatcat/templates/creator_view.html @@ -68,7 +68,7 @@ Raw Object: Fatcat Bits

State is "{{ creator.state }}". Revision:
{{ creator.revision }} -
As JSON object via API +
As JSON object via API

diff --git a/python/fatcat/templates/file_view.html b/python/fatcat/templates/file_view.html index febc2b19..70ce8771 100644 --- a/python/fatcat/templates/file_view.html +++ b/python/fatcat/templates/file_view.html @@ -93,7 +93,7 @@ Raw Object: Fatcat Bits

State is "{{ file.state }}". Revision:
{{ file.revision }} -
As JSON object via API +
As JSON object via API

diff --git a/python/fatcat/templates/home.html b/python/fatcat/templates/home.html index e8a5da21..4d3b44a1 100644 --- a/python/fatcat/templates/home.html +++ b/python/fatcat/templates/home.html @@ -20,7 +20,7 @@

This is versioned, user-editable catalog of research publications: journal articles, conference proceedings, pre-prints, etc. Features include archival file-level metadata (verified digests and long-term copies, in addition to -URLs), a documented API, and work/release +URLs), a documented API, and work/release indexing (aka, linking together of pre-prints and final copies). Read more... diff --git a/python/fatcat/templates/release_view.html b/python/fatcat/templates/release_view.html index cefbd047..96430f5f 100644 --- a/python/fatcat/templates/release_view.html +++ b/python/fatcat/templates/release_view.html @@ -247,7 +247,7 @@ This release citing other releases. Fatcat Bits

State is "{{ release.state }}". Revision:
{{ release.revision }} -
As JSON object via API +
As JSON object via API

diff --git a/python/fatcat/templates/work_view.html b/python/fatcat/templates/work_view.html index afee760e..87120e63 100644 --- a/python/fatcat/templates/work_view.html +++ b/python/fatcat/templates/work_view.html @@ -58,7 +58,7 @@ still reference the same underlying "work". Fatcat Bits

State is "{{ work.state }}". Revision:
{{ work.revision }} -
As JSON object via API +
As JSON object via API

-- cgit v1.2.3