@require_GET
@login_required
@permission_required(('wiki.add_revisionakismetsubmission', 'wiki.add_documentspamattempt', 'users.add_userban'), raise_exception=True)
def spam(request):
 yesterday = (datetime.date.today() - datetime.timedelta(days=1))
 data = SpamDashboardHistoricalStats().get(yesterday)
 if (not data):
  return render(request, 'dashboards/spam.html', {'processing': True})
 return render(request, 'dashboards/spam.html', data)

@ require_GET @ login_required @ permission_required ( ( 'wiki.add_revisionakismetsubmission' , 'wiki.add_documentspamattempt' , 'users.add_userban' ) , raise_exception = True ) def spam ( request ) : yesterday = ( datetime . date . today ( ) - datetime . timedelta ( days = 1 ) ) data = SpamDashboardHistoricalStats ( ) . get ( yesterday ) if ( not data ) : return render ( request , 'dashboards/spam.html' , { 'processing' : True } ) return render ( request , 'dashboards/spam.html' , data )
dashboard for spam moderators .