from django.urls import path
from django.contrib.auth.views import LoginView
from debug_toolbar.toolbar import debug_toolbar_urls

from . import views

urlpatterns = [
    path("", views.index, name="dashboard_home"),
    path("login", LoginView.as_view(next_page="all_sites"), name="login"),
    path("logout", views.logout_view, name="logout"),
    path("livedemo", views.guest_demo, name="livedemo"),
    path("sites/", views.all_sites, name="all_sites"),
    path("sites/<int:site_id>", views.site_view, name="site_view"),
    path("sites/<int:site_id>/windrows", views.windrow_charts_view, name="windrow_chart"),
    path("sites/<int:site_id>/windrows/<int:windrow_id>", views.windrow_view, name="site_windrow_view"),
    path("sites/<int:site_id>/windrows/<int:windrow_id>/temperature_sites/<int:temp_site_id>", views.temperature_site_view, name="site_windrow_temp_site_view"),
    path("chart", views.chart_test, name="chart_test"),

    path("api/v1/test_data", views.api_test_data, name="api_test_data")
] + debug_toolbar_urls()
