def tenant_dashboard(request, group_slug, tenant_slug):
    """Dashboard for managing a tenant."""
    groups = get_user_groups(request.user)
    group = get_object_or_404(groups, slug=group_slug)
    tenants = get_user_tenants(request.user, group)
    tenant = get_object_or_404(tenants, slug=tenant_slug)
    can_edit_tenant = request.user.has_perm('multitenancy.change_tenant', tenant)
    context = {
        'group': group,
        'tenant': tenant,
        'can_edit_tenant': can_edit_tenant,
    }
    return render(request, 'multitenancy/tenant-detail.html', context)
Dashboard for managing a tenant.