<commit_before>from __future__ import unicode_literals

from django.shortcuts import render_to_response
from django.template import RequestContext

from markitup import settings
from markitup.markup import filter_func

def apply_filter(request):
    markup = filter_func(request.POST.get('data', ''))
    return render_to_response('markitup/preview.html',
                              {'preview': markup},
                              context_instance=RequestContext(request))<commit_msg>Use plain render() in views.<commit_after>from __future__ import unicode_literals

from django.shortcuts import render

from markitup import settings
from markitup.markup import filter_func


def apply_filter(request):
    markup = filter_func(request.POST.get('data', ''))
    return render(request, 'markitup/preview.html', {'preview': markup})
{'fraction_non_alphanumeric': 0.08732057416267942, 'fraction_numerical': 0.0, 'mean_word_length': 4.2974683544303796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5585560', 'n_tokens_mistral': 231, 'n_tokens_neox': 223, 'n_words': 57}