Skip to content
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: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,4 @@ The documentation and a more detailed readme will come later.
3. Migrate your TOM's database to install the new database tables:
`./manage.py migrate`

4. Copy the data files from "tom_classifications/data" to the data/ directory of your TOM.

5. Copy the target_detail.py into your TOM:
`cp tom_classifications/tom_classifications/templates/tom_targets/target_detail.html [PATH]/mytom/templates/tom_targets/target_detail.html`
4. Copy the data files from "tom_classifications/data" to the data/ directory of your TOM.
17 changes: 17 additions & 0 deletions tom_classifications/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,20 @@
class TomClassificationsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'tom_classifications'

def target_detail_tabs(self):
"""
Integration point for adding tabs to the target detail page.

This method should return a list of dictionaries that include a `partial` key pointing to the path of the html
target_detail_tab partial.
The `context` key should point to the dot separated string path to the templatetag
that will return a dictionary containing new context for the accompanying partial.
The `label` key will represent the label string to put in the tab and use as a tab reference id.
This partial will be displayed within the tab on the target detail page.

"""
return [{'partial': f'{self.name}/partials/classification_tab.html',
'label': 'Classification',
# 'context': f'{self.name}.templatetags.classification_plots'
}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% load classification_plots %}

<h4>Classifications</h4>
{% classif_sun object %}
{% classif_scatter object %}
122 changes: 0 additions & 122 deletions tom_classifications/templates/tom_targets/target_detail.html

This file was deleted.