def index(request): """Show connection list.""" disks = disks_module.get_disks() root_device = disks_module.get_root_device(disks) expandable_root_size = disks_module.is_expandable(root_device) expandable_root_size = _format_bytes(expandable_root_size) return TemplateResponse(request, 'disks.html', {'title': _('Disks'), 'disks': disks, 'expandable_root_size': expandable_root_size})
def index(request): """Show connection list.""" disks = disks_module.get_disks() root_device = disks_module.get_root_device(disks) expandable_root_size = disks_module.is_expandable(root_device) expandable_root_size = _format_bytes(expandable_root_size) return TemplateResponse( request, 'disks.html', { 'title': _('Disks'), 'disks': disks, 'expandable_root_size': expandable_root_size })
def expand(request): """Warn and expand the root partition.""" disks = disks_module.get_disks() root_device = disks_module.get_root_device(disks) if request.method == 'POST': expand_partition(request, root_device) return redirect(reverse('disks:index')) expandable_root_size = disks_module.is_expandable(root_device) expandable_root_size = _format_bytes(expandable_root_size) return TemplateResponse(request, 'disks_expand.html', {'title': _('Expand Root Partition'), 'expandable_root_size': expandable_root_size})
def expand(request): """Warn and expand the root partition.""" disks = disks_module.get_disks() root_device = disks_module.get_root_device(disks) if request.method == 'POST': expand_partition(request, root_device) return redirect(reverse('disks:index')) expandable_root_size = disks_module.is_expandable(root_device) expandable_root_size = _format_bytes(expandable_root_size) return TemplateResponse( request, 'disks_expand.html', { 'title': _('Expand Root Partition'), 'expandable_root_size': expandable_root_size })