create a view to display the charts
This commit is contained in:
parent
93dfcf95d5
commit
b6ad61ccce
|
@ -1,3 +1,13 @@
|
|||
from django.shortcuts import render
|
||||
from . import plot
|
||||
from . import collector
|
||||
|
||||
# Create your views here.
|
||||
def index_view(request):
|
||||
collector.values_to_db()
|
||||
plot_temp = plot.temperature()
|
||||
plot_humidity = plot.humidity()
|
||||
plot_pressure = plot.pressure()
|
||||
return render(request, "collector/index.html",
|
||||
context={'plot_temp': plot_temp,
|
||||
'plot_humidity': plot_humidity,
|
||||
'plot_pressure': plot_pressure})
|
||||
|
|
Loading…
Reference in New Issue