@login_required
@app.route('/')
def index():
    filter_list = list(filters.all())

    try:
        page = int(request.args.get('p', 1))
    except (__HOLE__, ValueError):
        page = 1

    event_list = Group.objects.all()

    sort = request.args.get('sort')
    if sort == 'date':
        event_list = event_list.order_by('-last_seen')
    elif sort == 'new':
        event_list = event_list.order_by('-first_seen')
    elif sort == 'count':
        event_list = event_list.order_by('-count')
    else:
        sort = 'priority'
        event_list = event_list.order_by('-score')

    any_filter = False
    # for filter_ in filters:
    #     if not filter_.is_set():
    #         continue
    #     any_filter = True
        # event_list = filter_.get_query_set(event_list)

    today = datetime.datetime.now()

    has_realtime = page == 1
    
    return render_template('sentry/index.html', **{
        'has_realtime': has_realtime,
        'event_list': event_list,
        'today': today,
        'sort': sort,
        'any_filter': any_filter,
        'request': request,
        'filter_list': filter_list,
    })
dataset/ETHPy150Open dcramer/sentry-old/sentry/web/views.py/index