<s> import os <EOL> from docutils import core <EOL> from django . views . decorators . cache import cache_page <EOL> from django . shortcuts import render_to_response <EOL> from django . template import RequestContext <EOL> from django . conf import settings <EOL> def doc_parts ( input_string ) : <EOL> """<STR_LIT>""" <EOL> settings_overrides = { } if settings . DEBUG else { '<STR_LIT>' : '<STR_LIT>' } <EOL> parts = core . publish_parts ( source = input_string , writer_name = '<STR_LIT:html>' , <EOL> settings_overrides = settings_overrides ) <EOL> return parts <EOL> @ cache_page ( <NUM_LIT:10> * <NUM_LIT> ) <EOL> def docs_readme ( request ) : <EOL> """<STR_LIT>""" <EOL> file_path = os . path . join ( settings . ROOT_PATH , '<STR_LIT>' ) <EOL> file = open ( file_path , '<STR_LIT:r>' ) <EOL> parts = doc_parts ( file . read ( ) ) <EOL> context = { '<STR_LIT:content>' : parts [ '<STR_LIT>' ] } <EOL> return render_to_response ( <EOL> '<STR_LIT>' , RequestContext ( request , context ) ) </s>
