<commit_before>from os.path import dirname, abspath, join

from django.shortcuts import render_to_response
from django import template
from django.contrib.markup.templatetags.markup import restructuredtext

def index(request):
    readme_file = join(dirname(dirname(abspath(__file__))), 'README.txt')
    raw_content = open(readme_file).read()
    try:
        content = restructuredtext(raw_content)
    except template.TemplateSyntaxError:
        content = u'<pre>' + raw_content + u'</pre>'
        
    return render_to_response('index.html', {'content': content})<commit_msg>Modifed example.views.index() to use RequestContext<commit_after>from os.path import dirname, abspath, join

from django.shortcuts import render_to_response
from django import template
from django.template import RequestContext
from django.contrib.markup.templatetags.markup import restructuredtext

def index(request):
    readme_file = join(dirname(dirname(abspath(__file__))), 'README.txt')
    raw_content = open(readme_file).read()
    try:
        content = restructuredtext(raw_content)
    except template.TemplateSyntaxError:
        content = u'<pre>' + raw_content + u'</pre>'
        
    return render_to_response('index.html', {'content': content},
        context_instance=RequestContext(request))
{'fraction_non_alphanumeric': 0.102861562258314, 'fraction_numerical': 0.0, 'mean_word_length': 4.802690582959642, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '60456', 'n_tokens_mistral': 384, 'n_tokens_neox': 377, 'n_words': 84}