Conversation
swainn
left a comment
There was a problem hiding this comment.
In addition to the other comments, please add as many links to the Tethys docs as you can. I want links for every gizmo, map layout, templating, recipes, etc. referenced throughout the workshop: "To learn more about the MapView Gizmo, see: ".
See comments for other feedback.
| To test your newly scaffolded app, install it by running the following commands: | ||
|
|
||
| ```bash | ||
| cd tethysdev/tethysapp-earthquake_calculator |
There was a problem hiding this comment.
| cd tethysdev/tethysapp-earthquake_calculator | |
| cd ~/tethysdev/tethysapp-earthquake_calculator |
| tethys start | ||
| ``` | ||
|
|
||
| Now, go to [localhost:8000](http://localhost:8000) to view your app in your browser. |
There was a problem hiding this comment.
| Now, go to [localhost:8000](http://localhost:8000) to view your app in your browser. | |
| Now, go to [localhost:8000](http://localhost:8000) to view your app in your browser. | |
| If prompted to login, use the default username and password: | |
| username: admin | |
| password: pass |
|
|
||
| To set the image that shows up for your app in the Tethys library and next to the app name, first add that image to the `public/images` directory inside your app files. | ||
|
|
||
| Here is an example image to use: [Download Example App Icon](/img/getting-started/earthquake-app-icon.png) |
There was a problem hiding this comment.
| Here is an example image to use: [Download Example App Icon](/img/getting-started/earthquake-app-icon.png) | |
| Here is an example image to use: [Download Example App Icon](/img/getting-started/earthquake-app-icon.png) Save the image as `earthquake-app-icon.png` in the `public/images` directory of the app. |
| To change the accent color used throughout your app, change the color to any hexcode color you'd like: | ||
|
|
||
| ```python | ||
| color='#0E4F57' |
There was a problem hiding this comment.
| color='#0E4F57' | |
| color = '#0E4F57' |
| color='#0E4F57' | ||
| ``` | ||
|
|
||
| After making these changes, just reload your app and you'll see them reflected in the browser inside your app. |
There was a problem hiding this comment.
| After making these changes, just reload your app and you'll see them reflected in the browser inside your app. | |
| After making these changes, the development server should reload and then you can reload the page to the changes reflected in the browser. |
| Begin by adding the `compose_layers` method to your MapLayout controller class in `controllers.py`: | ||
|
|
||
| ```python {5-30} | ||
| @controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True) |
There was a problem hiding this comment.
Use dashes instead of underscores for URLs:
| @controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True) | |
| @controller(name="view_all_earthquakes", url="view-all-earthquakes", app_workspace=True) |
| Begin by updating your MapLayout class: | ||
|
|
||
| ```python {11-12} | ||
| @controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True) |
There was a problem hiding this comment.
| @controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True) | |
| @controller(name="view_all_earthquakes", url="view-all-earthquakes", app_workspace=True) |
| ```python {1,7-84} | ||
| import numpy as np | ||
|
|
||
| @controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True) |
There was a problem hiding this comment.
| @controller(name="view_all_earthquakes", url="view_all_earthquakes", app_workspace=True) | |
| @controller(name="view_all_earthquakes", url="view-all-earthquakes", app_workspace=True) |
| - Wire up forms and custom settings | ||
| - Perform calculations | ||
| - Visualize the results with both interactive maps and plots. | ||
|
|
There was a problem hiding this comment.
Let's get the solution posted on Tethys Platform GitHub and put a link to it at the end of the workshop tutorial (hereish).
| - Perform calculations | ||
| - Visualize the results with both interactive maps and plots. | ||
|
|
||
| For more information and tutorials like this one on how to build Tethys web applications, checkout the [Tethys Platform documentation](https://docs.tethysplatform.org/) |
There was a problem hiding this comment.
Add a "Next Steps" section with links to relevant tutorials they can do next.
This merge request includes the full getting-started workshop.