Add new front page with boxes and thing types tree
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 29s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 6s
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 29s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 6s
- Replace simple HTML index with full template - Add grid of all boxes with details and item counts - Add expandable tree view of thing types using MPTT - Add 'mptt' to INSTALLED_APPS for recursetree tag - Add jQuery for tree toggle functionality Bump container version to 0.027
This commit is contained in:
@@ -6,9 +6,13 @@ from .models import Box, Thing, ThingType
|
||||
|
||||
|
||||
def index(request):
|
||||
"""Simple index page."""
|
||||
html = '<h1>LabHelper</h1><p><a href="/search/">Search Things</a> | <a href="/admin/">Admin</a></p>'
|
||||
return HttpResponse(html)
|
||||
"""Home page with boxes and thing types."""
|
||||
boxes = Box.objects.select_related('box_type').all().order_by('id')
|
||||
thing_types = ThingType.objects.all()
|
||||
return render(request, 'boxes/index.html', {
|
||||
'boxes': boxes,
|
||||
'thing_types': thing_types,
|
||||
})
|
||||
|
||||
|
||||
def box_detail(request, box_id):
|
||||
|
||||
Reference in New Issue
Block a user