def view_user_reports(request): if request.method == 'POST': form = user_reports.UserReportForm(request.POST, request.FILES) else: form = user_reports.getDefaultForm() report = user_reports.User_Report(form) users = report.get_users() return render(request, 'staff/members/user_reports.html', {'users': users, 'form': form})
def view_user_reports(request): if request.method == 'POST': form = user_reports.UserReportForm(request.POST, request.FILES) else: form = user_reports.getDefaultForm() report = user_reports.User_Report(form) users = report.get_users() return render_to_response('staff/user_reports.html', {'users': users, 'form': form}, context_instance=RequestContext(request))