Skip to content

Commit

Permalink
make the code tidier
Browse files Browse the repository at this point in the history
  • Loading branch information
kimakan committed Dec 21, 2023
1 parent cc5ced3 commit 4427a50
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions daiquiri/datalink/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,13 @@ def get_context_data(self, request, **kwargs):
def get_datalink_rows(self, identifiers, **kwargs):
'''Get the list of datalink entries for the provided identifiers (incl. table- and dynamic- datalink)
'''


# get the datalink entries from Datalink Table and metadata (Table and Schema)
static_datalink_rows = list(Datalink.objects.filter(ID__in=identifiers).values())

# get the dynamic datalink entries
dyn_datalink_rows = self.get_dyn_datalink_links(identifiers)
datalink_rows = static_datalink_rows + dyn_datalink_rows


# create a full URI for the custom semantics
for row in datalink_rows:
if row['semantics'] in settings.DATALINK_CUSTOM_SEMANTICS:
Expand Down
1 change: 0 additions & 1 deletion daiquiri/datalink/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
DATALINK_ADAPTER = 'daiquiri.datalink.adapter.DefaultDatalinkAdapter'
DATALINK_TABLES = []

DATALINK_CUSTOM_SEMANTICS = {
"#doi": "The access_url points to the Digital Object Identifier (DOI) of the object.",
}
2 changes: 0 additions & 2 deletions daiquiri/datalink/templates/datalink/datalink-semantics.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ <h1>The extension to the Datalink-core dictionary</h1>

{% for semantics, description in custom_semantics.items %}
<tr>

<td>{{ settings.SITE_URL }}{% url 'datalink:datalink-semantics' %}{{ semantics }}</td>
<td>{{ description }}</td>
</tr>

{% endfor %}

</tbody>
Expand Down

0 comments on commit 4427a50

Please sign in to comment.