Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed #127 - Added custom license for GAIA products #129

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compose/local/daiquiri/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ fi

python manage.py collectstatic --clear --noinput --verbosity 0

if [ ! -e /app/static_root/metadata/img/by_gaia.png ]; then
echo "${NO_COLOR}Copy Gaia License Icon.${NO_COLOR}"
cp /app/static/daiquiri/imgs/by_gaia.png /app/static_root/metadata/img/by_gaia.png
fi

echo "${YELLOW}Running Migrate.${NO_COLOR}"
python manage.py migrate # initializes the web database
python manage.py migrate --database tap # initializes the tap schema in the scientific db
Expand Down
19 changes: 17 additions & 2 deletions daiquiri/config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import os

import daiquiri.core.env as env
import saml2
import saml2.saml

import daiquiri.core.env as env
from django.utils.translation import gettext_lazy as _

from . import (
ADDITIONAL_APPS,
AUTHENTICATION_BACKENDS,
BASE_DIR,
BASE_URL,
DJANGO_APPS,
LICENSE_CHOICES,
LICENSE_IDENTIFIERS,
LICENSE_URLS,
LOGIN_URL,
LOGOUT_URL,
MIDDLEWARE,
Expand Down Expand Up @@ -289,6 +292,18 @@
},
]

# -----------------------------------------------
# GAIA AIP LICENSE
# https://github.com/django-daiquiri/daiquiri/blob/master/daiquiri/metadata/settings.py
# -----------------------------------------------

LICENSE_CHOICES = list(LICENSE_CHOICES)
LICENSE_BY_GAIA = "BY_GAIA"
LICENSE_CHOICES.append((LICENSE_BY_GAIA, _("Gaia Data License")))
LICENSE_URLS[LICENSE_BY_GAIA] = "https://gaia.aip.de/cms/credit/"
LICENSE_IDENTIFIERS[LICENSE_BY_GAIA] = "BY_GAIA"
LICENSE_CHOICES = tuple(LICENSE_CHOICES)


# -----------------------------------------------
# LInea Specific
Expand Down
8 changes: 4 additions & 4 deletions daiquiri/fixtures/gaia_dr3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<p>Database access and other data services are provided by the Associação Laboratório Interinstitucional de e-Astronomia (LIneA) with the financial support from INCT do e-Universo (Processo n.º 465376/2014-2).</p></blockquote>
order: 1
license: PD
doi: ""
license: BY_GAIA
doi: 10.17876/gaia/dr.3/1
published: 2020-01-01
updated: 2018-01-01
access_level: PUBLIC
Expand Down Expand Up @@ -112,8 +112,8 @@

<p>Database access and other data services are provided by the Associação Laboratório Interinstitucional de e-Astronomia (LIneA) with the financial support from INCT do e-Universo (Processo n.º 465376/2014-2).</p></blockquote>
order: 1
license: PD
doi: ""
license: BY_GAIA
doi: 10.17876/gaia/dr.3/1
published: 2020-01-01
updated: 2018-01-01
access_level: PUBLIC
Expand Down
Binary file added daiquiri/static/daiquiri/imgs/by_gaia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading