<s> from django . conf import settings <EOL> from django import http <EOL> from django . template import Context , RequestContext , loader <EOL> def server_error ( request , template_name = '<STR_LIT>' ) : <EOL> """<STR_LIT>""" <EOL> t = loader . get_template ( template_name ) <EOL> c = Context ( { <EOL> '<STR_LIT>' : settings . MEDIA_URL , <EOL> '<STR_LIT>' : settings . STATIC_URL , <EOL> } ) <EOL> return http . HttpResponseServerError ( t . render ( c ) ) <EOL> def url_error ( request , template_name = '<STR_LIT>' ) : <EOL> t = loader . get_template ( template_name ) <EOL> c = RequestContext ( request ) <EOL> return http . HttpResponseNotFound ( t . render ( c ) ) </s>
