@login_required
def details(request, code):
    _refresh_last_active_date(request.profile)
    (check, rw) = _get_check_for_user(request, code)
    channels = Channel.objects.filter(project=check.project)
    channels = list(channels.order_by('created'))
    all_tags = set()
    q = Check.objects.filter(project=check.project).exclude(tags='')
    for tags in q.values_list('tags', flat=True):
        all_tags.update(tags.split(' '))
    ctx = {'page': 'details', 'project': check.project, 'check': check, 'rw': rw, 'channels': channels, 'enabled_channels': list(check.channel_set.all()), 'timezones': pytz.all_timezones, 'downtimes': check.downtimes(months=3), 'is_new': ('new' in request.GET), 'is_copied': ('copied' in request.GET), 'all_tags': ' '.join(sorted(all_tags))}
    return render(request, 'front/details.html', ctx)
@login_required
def details(request, code):
    _refresh_last_active_date(request.profile)
    (check, rw) = _get_check_for_user(request, code)
    channels = Channel.objects.filter(project=check.project)
    channels = list(channels.order_by('created'))
    all_tags = set()
    q = Check.objects.filter(project=check.project).exclude(tags=)
    for tags in q.values_list('tags', flat=True):
        all_tags.update(tags.split(' '))
    ctx = {'page': 'details', 'project': check.project, 'check': check, 'rw': rw, 'channels': channels, 'enabled_channels': list(check.channel_set.all()), 'timezones': pytz.all_timezones, 'downtimes': check.downtimes(months=3), 'is_new': ('new' in request.GET), 'is_copied': ('copied' in request.GET), 'all_tags': ' '.join(sorted(all_tags))}
    return render(request, 'front/details.html', ctx)