Markdown to HTML - jordy33/turbogears_tutorial GitHub Wiki
Markdown:
Step 1
Copy the file from this repository HELP.md in your root file of your project.
Step 2
In setup.py insert "markdown"
Step 3
IN root.py add the following route:
@expose()
def help(self):
app_dir = os.getenv('MERCURY_DIR')
if app_dir is None:
app_dir = os.getcwd()
currentDirectory = app_dir
with open(currentDirectory+ '/HELP.md','r') as markdown_file:
content = markdown_file.read()
return markdown.markdown(content)
Step 4
Check the result
http://localhost:8080/help