views.py 1.14 KB
from django.shortcuts import render, redirect
from django.core import urlresolvers

def home(request):
    return render(request, 'dashboard/home.html')

def users(request):
    url_ = urlresolvers.reverse('admin:auth_user_changelist')
    return redirect(url_)

def alerts(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_alert_changelist')
    return redirect(url_)

def routines(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_request_changelist')
    return redirect(url_)

def weather(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_weatherwatch_changelist')
    return redirect(url_)

def site(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_sitewatch_changelist')
    return redirect(url_)

def devices(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_device_changelist')
    return redirect(url_)

def system(request):
    return render(request, 'dashboard/system.html')

def schedule(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_schedule_changelist')
    return redirect(url_)

def quotas(request):
    url_ = urlresolvers.reverse('admin:pyrosapp_pyrosuser_changelist')
    return redirect(url_)