2017-12-22 17:02:24 +01:00
|
|
|
#!/usr/bin/python3
|
|
|
|
from django.shortcuts import get_object_or_404, render
|
2017-12-25 13:33:28 +01:00
|
|
|
from .models import (Device, Computer, CronJob,
|
|
|
|
ComputerRamRelation,
|
|
|
|
ComputerDiskRelation,
|
|
|
|
ComputerCpuRelation)
|
2017-12-25 00:37:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
def index(request):
|
|
|
|
device_list = Device.objects.all()
|
|
|
|
computer_list = Computer.objects.all()
|
|
|
|
|
|
|
|
return render(request,
|
|
|
|
'inventory/index.html',
|
2017-12-25 13:34:00 +01:00
|
|
|
{'device_list': device_list,
|
2017-12-25 00:37:52 +01:00
|
|
|
'computer_list': computer_list})
|