Skip to content

Commit

Permalink
Rename persistent sharing to continuously share in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed Dec 11, 2024
1 parent 030c194 commit fa299f0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 4 additions & 0 deletions tom_targets/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

class TomTargetsConfig(AppConfig):
name = 'tom_targets'

def ready(self):
import tom_targets.signals.handlers # noqa
super().ready()
4 changes: 2 additions & 2 deletions tom_targets/signals/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


@receiver(post_save, sender=ReducedDatum)
def cb_dataproduct_post_save(sender, instance, *args, **kwargs):
# When a new dataproduct is created or updated, check for any persistentshare instances on that target
def cb_reduceddatum_post_save(sender, instance, *args, **kwargs):
# When a new ReducedDatum is created or updated, check for any persistentshare instances on that target
# and if they exist, attempt to share the new data
target = instance.target
continuous_share_data(target, reduced_datums=[instance])
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/base64.min.js"></script>
{% endblock %}
{% block content %}
<h3>Create Persistent Share {% if target %} for Target <a href="{% url 'targets:detail' pk=target.id %}" title="Back">{{ target.name }}</a>{% endif %}</h3>
<h3>Continuously Share data {% if target %} for Target <a href="{% url 'targets:detail' pk=target.id %}" title="Back">{{ target.name }}</a>{% endif %}</h3>
<div id='target-persistent-share-create'>
{% create_persistent_share target %}
</div>
<h3>Manage Persistent Shares {% if target %} for Target <a href="{% url 'targets:detail' pk=target.id %}" title="Back">{{ target.name }}</a>{% endif %}</h3>
<h3>Manage Continous Sharing {% if target %} for Target <a href="{% url 'targets:detail' pk=target.id %}" title="Back">{{ target.name }}</a>{% endif %}</h3>
<div id='target-persistent-share-table'>
{% csrf_token %}
{% persistent_share_table target %}
{% buttons %}
{% endbuttons %}
</div>

{% buttons %}
{% endbuttons %}
{% endblock %}
4 changes: 2 additions & 2 deletions tom_targets/templates/tom_targets/target_share.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ <h4> Include Data </h4>
</div>
<div class="tab-pane" id="persistentshare">
<div class="col-md-12">
<h3>Create Persistent Share for Target <a href="{% url 'targets:detail' pk=target.id %}" title="Back">{{ target.name }}</a></h3>
<h3>Continously Share data for Target <a href="{% url 'targets:detail' pk=target.id %}" title="Back">{{ target.name }}</a></h3>
<div id='target-persistent-share-create'>
{% create_persistent_share target %}
</div>
<h3>Manage Persistent Shares for Target <a href="{% url 'targets:detail' pk=target.id %}"
<h3>Manage Continuous Sharing for Target <a href="{% url 'targets:detail' pk=target.id %}"
title="Back">{{ target.name }}</a></h3>
<div id='target-persistent-share-table'>
{% persistent_share_table target %}
Expand Down

0 comments on commit fa299f0

Please sign in to comment.