@handle_response_format
@treeio_login_required
def dashboard_widget_delete(request, widget_id, response_format='html'):

    widget = get_object_or_404(Widget, pk=widget_id)

    if widget.user == request.user.profile:
        widget.delete()

    return HttpResponseRedirect(reverse('core_dashboard_index'))
Test whether values for lazy virtual fields can be extracted
dataset/ETHPy150Open treeio/treeio/treeio/core/dashboard/views.py/dashboard_widget_delete--crossover with--dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3resource.py/ResourceLazyVirtualFieldsSupportTests.testLazyVirtualFieldsExtract