network_inventory/inventory/views.py

13 lines
349 B
Python
Raw Normal View History

2017-12-22 17:02:24 +01:00
#!/usr/bin/python3
from django.shortcuts import get_object_or_404, render
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',
{'device_list': category_list,
'computer_list': computer_list})