Skip to content

Commit 229bac4

Browse files
committed
updates for tethys-4.3
1 parent d28c787 commit 229bac4

File tree

9 files changed

+12
-44
lines changed

9 files changed

+12
-44
lines changed

.gitignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

install.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

tethysapp/map_layout_tutorial/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from tethys_sdk.base import TethysAppBase
22

33

4-
class MapLayoutTutorial(TethysAppBase):
4+
class App(TethysAppBase):
55
"""
66
Tethys app class for Map Layout Tutorial.
77
"""

tethysapp/map_layout_tutorial/controllers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import pandas as pd
44
from tethys_sdk.layouts import MapLayout
55
from tethys_sdk.routing import controller
6-
from .app import MapLayoutTutorial as app
6+
from .app import App
77

88

99
MODEL_OUTPUT_FOLDER_NAME = 'sample_nextgen_data'
1010

1111
@controller(name="home", app_workspace=True)
1212
class MapLayoutTutorialMap(MapLayout):
13-
app = app
14-
base_template = 'map_layout_tutorial/base.html'
13+
app = App
14+
base_template = f'{App.package}/base.html'
1515
map_title = 'Map Layout Tutorial'
1616
map_subtitle = 'NOAA-OWP NextGen Model Outputs'
1717
default_map_extent = [-87.83371926334216, 33.73443611122197, -86.20833410475134, 34.456557011634175]
@@ -71,7 +71,7 @@ def compose_layers(self, request, map_view, app_workspace, *args, **kwargs):
7171
]
7272

7373
return layer_groups
74-
74+
7575
@classmethod
7676
def get_vector_style_map(cls):
7777
return {
@@ -99,7 +99,7 @@ def get_vector_style_map(cls):
9999
}
100100

101101
def get_plot_for_layer_feature(self, request, layer_name, feature_id, layer_data, feature_props, app_workspace,
102-
*args, **kwargs):
102+
*args, **kwargs):
103103
"""
104104
Retrieves plot data for given feature on given layer.
105105
@@ -178,4 +178,4 @@ def get_plot_for_layer_feature(self, request, layer_name, feature_id, layer_data
178178
},
179179
]
180180

181-
return f'Evapotranspiration at Catchment "{id}"', data, layout
181+
return f'Evapotranspiration at Catchment "{id}"', data, layout
-34.9 KB
Loading

tethysapp/map_layout_tutorial/workspaces/app_workspace/.gitkeep renamed to tethysapp/map_layout_tutorial/resources/.gitkeep

File renamed without changes.

tethysapp/map_layout_tutorial/templates/map_layout_tutorial/base.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "tethys_apps/app_base.html" %}
22

3-
{% load static %}
3+
{% load static tethys %}
44

55
{% block title %}{{ tethys_app.name }}{% endblock %}
66

@@ -33,10 +33,10 @@
3333

3434
{% block content_dependent_styles %}
3535
{{ block.super }}
36-
<link href="{% static 'map_layout_tutorial/css/main.css' %}" rel="stylesheet"/>
36+
<link href="{% static tethys_app|public:'css/main.css' %}" rel="stylesheet"/>
3737
{% endblock %}
3838

3939
{% block scripts %}
4040
{{ block.super }}
41-
<script src="{% static 'map_layout_tutorial/js/main.js' %}" type="text/javascript"></script>
41+
<script src="{% static tethys_app|public:'js/main.js' %}" type="text/javascript"></script>
4242
{% endblock %}

tethysapp/map_layout_tutorial/templates/map_layout_tutorial/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% extends "map_layout_tutorial/base.html" %}
2-
{% load tethys_gizmos %}
1+
{% extends tethys_app.package|add:"/base.html" %}
2+
{% load tethys %}
33

44
{% block header_buttons %}
55
<div class="header-button glyphicon-button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Help">

tethysapp/map_layout_tutorial/workspaces/user_workspaces/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)