# Path: washmap/washmap/views.py
# class WashMapServerView(TemplateView):
#     template_name = 'washmap/chart_from_server.html'
# 
#     @app_document_no_tag('washmap', settings.BOKEH_URL)
#     def make_app(self):
#         app = WashmapApp.create()
#         return app
# 
#     def get_context_data(self, *args, **kwargs):
#         context = super(WashMapServerView, self).get_context_data(*args, **kwargs)  # nopep8
#         applet = self.make_app()
#         applet_dict = {
#             'elementid': 'washmap',
#             'root_url': applet._root_url,
#             'docid': applet._docid,
#             'modelid': applet._id,
#             'js_model': applet.js_model,
#             'modulename': applet.js_model,
#             'classname': applet.js_model,
#             'parentname': applet.parent_model,
#         }
#         context.update(
#             applet=applet_dict
#         )
#         return context
# 
# class LineStaticView(TemplateView):
#     template_name = 'washmap/chart_basic_embed.html'
# 
#     def get_context_data(self, *args, **kwargs):
#         context = super(LineStaticView, self).get_context_data(*args, **kwargs)
#         line_chart = make_line_chart()
#         embed_script, embed_div = components(line_chart, Resources())
#         context.update(
#             embed_div=embed_div,
#             embed_script=embed_script
#         )
#         return context
# 
# class WashMapStaticMapView(WashMapStaticView):
#     name = 'map'
# 
#     def make_plot(self):
#         plot = make_washmap_map()
#         return plot
# 
# class WashMapStaticMapToolsView(WashMapStaticView):
# 
#     def make_plot(self):
#         plot = make_washmap_map_tools()
#         return plot
# 
# class WashMapStaticMapToolsLinkedView(WashMapStaticView):
#     def make_plot(self):
#         plot = make_washmap_map_tools_linked()
#         return plot
# 
# class WashMapStaticMapToolsLinkedTabbedView(WashMapStaticView):
#     def make_plot(self):
#         plot = make_washmap_map_tools_linked_tabbed()
#         return plot
# 
# class WashMapStaticAllView(WashMapStaticView):
#     def make_plot(self):
#         plot = make_washmap_all()
#         return plot


from django.conf.urls import patterns, url
from .views import (
    WashMapServerView,
    LineStaticView,
    WashMapStaticMapView,
    WashMapStaticMapToolsView,
    WashMapStaticMapToolsLinkedView,
    WashMapStaticMapToolsLinkedTabbedView,
    WashMapStaticAllView,
)
from __future__ import unicode_literals, absolute_import



urlpatterns = patterns('',
    url(r'^$', WashMapServerView.as_view()),
    url(r'^line$', LineStaticView.as_view()),
    url(r'^static_map$', WashMapStaticMapView.as_view()),
    url(r'^static_map_tools$', WashMapStaticMapToolsView.as_view()),

# Path: washmap/washmap/views.py
# class WashMapServerView(TemplateView):
#     template_name = 'washmap/chart_from_server.html'
# 
#     @app_document_no_tag('washmap', settings.BOKEH_URL)
#     def make_app(self):
#         app = WashmapApp.create()
#         return app
# 
#     def get_context_data(self, *args, **kwargs):
#         context = super(WashMapServerView, self).get_context_data(*args, **kwargs)  # nopep8
#         applet = self.make_app()
#         applet_dict = {
#             'elementid': 'washmap',
#             'root_url': applet._root_url,
#             'docid': applet._docid,
#             'modelid': applet._id,
#             'js_model': applet.js_model,
#             'modulename': applet.js_model,
#             'classname': applet.js_model,
#             'parentname': applet.parent_model,
#         }
#         context.update(
#             applet=applet_dict
#         )
#         return context
# 
# class LineStaticView(TemplateView):
#     template_name = 'washmap/chart_basic_embed.html'
# 
#     def get_context_data(self, *args, **kwargs):
#         context = super(LineStaticView, self).get_context_data(*args, **kwargs)
#         line_chart = make_line_chart()
#         embed_script, embed_div = components(line_chart, Resources())
#         context.update(
#             embed_div=embed_div,
#             embed_script=embed_script
#         )
#         return context
# 
# class WashMapStaticMapView(WashMapStaticView):
#     name = 'map'
# 
#     def make_plot(self):
#         plot = make_washmap_map()
#         return plot
# 
# class WashMapStaticMapToolsView(WashMapStaticView):
# 
#     def make_plot(self):
#         plot = make_washmap_map_tools()
#         return plot
# 
# class WashMapStaticMapToolsLinkedView(WashMapStaticView):
#     def make_plot(self):
#         plot = make_washmap_map_tools_linked()
#         return plot
# 
# class WashMapStaticMapToolsLinkedTabbedView(WashMapStaticView):
#     def make_plot(self):
#         plot = make_washmap_map_tools_linked_tabbed()
#         return plot
# 
# class WashMapStaticAllView(WashMapStaticView):
#     def make_plot(self):
#         plot = make_washmap_all()
#         return plot


# Path: washmap/washmap/urls.py
from django.conf.urls import patterns, url
from .views import (
    WashMapServerView,
    LineStaticView,
    WashMapStaticMapView,
    WashMapStaticMapToolsView,
    WashMapStaticMapToolsLinkedView,
    WashMapStaticMapToolsLinkedTabbedView,
    WashMapStaticAllView,
)

from __future__ import unicode_literals, absolute_import



urlpatterns = patterns('',
    url(r'^$', WashMapServerView.as_view()),
    url(r'^line$', LineStaticView.as_view()),
    url(r'^static_map$', WashMapStaticMapView.as_view()),
    url(r'^static_map_tools$', WashMapStaticMapToolsView.as_view()),

    url(r'^static_map_tools_linked$', WashMapStaticMapToolsLinkedView.as_view()),