mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-06-27 19:55:18 +02:00
add an index view
This commit is contained in:
parent
6d0231f9f6
commit
d4a20bd57d
|
@ -376,6 +376,16 @@ admin.site.register(CronJob)
|
|||
from django.shortcuts import get_object_or_404, render
|
||||
|
||||
|
||||
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})
|
||||
#+END_SRC
|
||||
|
||||
* Templates
|
||||
|
||||
Templates define the look of the application and where things get
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
#!/usr/bin/python3
|
||||
from django.shortcuts import get_object_or_404, render
|
||||
|
||||
|
||||
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})
|
||||
|
|
Loading…
Reference in New Issue
Block a user