(request, pk)
return HttpResponseRedirect(reverse('admin:report_builder_scheduled_scheduledreport_changelist'))
Manually run a scheduled report - useful for testing or one off situations
Manually run a scheduled report - useful for testing or one off situations
Manually run a scheduled report - useful for testing or one off situations
def run_scheduled_report(request, pk):
    """ Manually run a scheduled report - useful for testing or one off situations """
    scheduled_report = get_object_or_404(ScheduledReport, pk=pk)
    report_builder_run_scheduled_report.delay(scheduled_report.id)
    messages.success(request, "Ran scheduled report")
    return HttpResponseRedirect(reverse('admin:report_builder_scheduled_scheduledreport_changelist'))
def run_scheduled_report ( request , pk ) : scheduled_report = get_object_or_404 ( ScheduledReport , pk = pk ) report_builder_run_scheduled_report . delay ( scheduled_report . id ) messages . success ( request , "Ran scheduled report" ) return HttpResponseRedirect ( reverse ( 'admin:report_builder_scheduled_scheduledreport_changelist' ) )