<s> from django import http <EOL> from django . views . decorators . csrf import requires_csrf_token <EOL> from django . template import Context , RequestContext , loader <EOL> @ requires_csrf_token <EOL> def page_not_found ( request , template_name = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> t = loader . get_template ( template_name ) <EOL> return http . HttpResponseNotFound ( t . render ( RequestContext ( request , { '<STR_LIT>' : request . path } ) ) ) <EOL> @ requires_csrf_token <EOL> def server_error ( request , template_name = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> t = loader . get_template ( template_name ) <EOL> return http . HttpResponseServerError ( t . render ( Context ( { } ) ) ) <EOL> def shortcut ( request , content_type_id , object_id ) : <EOL> from django . contrib . contenttypes . views import shortcut as real_shortcut <EOL> return real_shortcut ( request , content_type_id , object_id ) </s>
