#NEWLINE# @ cacheable ( '%(pagename)s' , timeout = 30 ) #NEWLINE# def render( self , context ) : #NEWLINE# #INDENT# pagename = self . pagename . resolve ( context ) #NEWLINE# from niwi.web.models import Page #NEWLINE# try : #NEWLINE# #INDENT# page = Page . objects . get ( slug = pagename ) #NEWLINE# #UNINDENT# except Page . DoesNotExist : #NEWLINE# #INDENT# return mark_safe ( '' ) #NEWLINE# #UNINDENT# t = template . Template ( page . content ) #NEWLINE# result = t . render ( context ) #NEWLINE# return mark_safe ( result )