One part of my site is a wiki engine. When a page does not exist I want to provide a custom 404 error page containing a link to create a new page. This custom 404 should only be seen in the context of a failed wiki page view.
To implement this logic I simply return (not raise) a HTTPNotFound() object with a custom message containing a link for the new page creation. Unfortunately the links are escaped. How can I force the html links to appear as links ?
Edit: I found a solution form Python Pyramid & Chameleon templating language escapes html
class Literal:
def __init__(self, s):
self.s = s
def __html__(self):
return self.s
It's very likely that such an object already exists in Pyramid