Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CI-WATER/tethys
Browse files Browse the repository at this point in the history
  • Loading branch information
swainn committed Jul 11, 2015
2 parents 5986b06 + 5a67a3b commit 4e60a23
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs/* linguist-documentation
static/tethys_portal/vendor/* linguist-vendored
tethys_apps/static/vendor/* linguist-vendored
tethys_gizmos/static/vendor/* linguist-vendored
Binary file modified docs/images/map_single_page.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/new_map_page.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions docs/tethys_sdk/gizmos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ A detailed description of each step follows.

The first step is to import the appropriate options object and configure the Gizmo. This is performed in the controller of the template where the Gizmo will be used.

In this case, we import ``DatePickerOptions`` and initialize a new object called ``date_picker_options`` with the appropriate options. Then we pass the object to the template via the ``context`` dictionary:
In this case, we import ``DatePicker`` and initialize a new object called ``date_picker_options`` with the appropriate options. Then we pass the object to the template via the ``context`` dictionary:

::

from tethys_gizmos.gizmos_options import DatePickerOptions
from tethys_apps.sdk.gizmos import DatePicker

def example_controller(request):
"""
Example of a controller that defines options for a Template Gizmo.
"""
date_picker_options = DatePickerOptions(name='data1',
display_text='Date',
autoclose=True,
format='MM d, yyyy',
start_date='2/15/2014',
start_view='decade',
today_button=True,
initial='February 15, 2014')
date_picker_options = DatePicker(name='data1',
display_text='Date',
autoclose=True,
format='MM d, yyyy',
start_date='2/15/2014',
start_view='decade',
today_button=True,
initial='February 15, 2014')

context = {'date_picker_options': date_picker_options}

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/getting_started/url_mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ In this code, the ``url`` template tag is used to provide the url to the map pag
View New Map Page
=================

At this point, your app should be ready to run again. Save all changes in the files you edited and restart the development server using the ``tethys manage start`` command in the terminal (stop it using :kbd:`CTRL-C` if necessary). Browse to your app home page at `<http://127.0.0.1:8000/apps/my-first-app>`_. Use the "Go To Map" action to browse to your new map page. It should look similar to this:
At this point, your app should be ready to run again. Save all changes in the files you edited and restart the development server using the ``tethys manage start`` command in the terminal (stop it using :kbd:`CTRL-C` if necessary). Browse to your app home page at `<http://127.0.0.1:8000/apps/my-first-app>`_. Use the "Go To Map" action to browse to your new map page. Click on the "Provo Stream Gages" layer in the legend to zoom to that layer. Your map page should look similar to this:

.. figure:: ../../images/new_map_page.png
:width: 650px
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

requires = []


version = '1.1.0'

setup(
Expand Down
16 changes: 8 additions & 8 deletions tethys_gizmos/gizmo_options/highcharts_plot_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ class HighChartsLinePlot(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view line_plot_view %}
{% gizmo highcharts_plot_view line_plot_view %}
"""

Expand Down Expand Up @@ -594,7 +594,7 @@ class HighChartsPolarPlot(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view web_plot %}
{% gizmo highcharts_plot_view web_plot %}
"""

Expand Down Expand Up @@ -705,7 +705,7 @@ class HighChartsScatterPlot(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view scatter_plot_view %}
{% gizmo highcharts_plot_view scatter_plot_view %}
"""

Expand Down Expand Up @@ -789,7 +789,7 @@ class HighChartsPiePlot(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view pie_plot_view %}
{% gizmo highcharts_plot_view pie_plot_view %}
"""

Expand Down Expand Up @@ -869,7 +869,7 @@ class HighChartsBarPlot(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view bar_plot_view %}
{% gizmo highcharts_plot_view bar_plot_view %}
"""

Expand Down Expand Up @@ -985,7 +985,7 @@ class HighChartsTimeSeries(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view timeseries_plot %}
{% gizmo highcharts_plot_view timeseries_plot %}
"""

def __init__(self, series=[], title='', subtitle='', y_axis_title='', y_axis_units='', **kwargs):
Expand Down Expand Up @@ -1094,7 +1094,7 @@ class HighChartsAreaRange(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view area_range_plot %}
{% gizmo highcharts_plot_view area_range_plot %}
"""

Expand Down Expand Up @@ -1195,7 +1195,7 @@ class HighChartsHeatMap(HighChartsObjectBase):
# TEMPLATE
{% gizmo plot_view heat_map_plot %}
{% gizmo highcharts_plot_view heat_map_plot %}
"""

Expand Down

0 comments on commit 4e60a23

Please sign in to comment.