flask

Github flavored markdown with python

I'm slowly migrating some parts of my personal Wiki to Github using their own markdown syntax. Before committing, I wanted to make sure the docs look like they should. Here's a small Flask snippet I wrote in order to achieve this: Python Markdown has an extension called fenced code blocks which supports Github‘s tidle (```) syntax, thus making this small program's output similar to what the doc will finally look like.

LDAP Flask-Login snippet

At ${DAYWORK}, I am writing a simple Flask web frontend for our new information system. I wanted to have a simple authentication method and so I found the Flask-Login extention for Flask which takes care of user validation, session remembrance , and has a callback method in order to plug the authentication on whatever backend you'd like. I came up with that little piece of code which makes Flask-Login check a user / password couple against a LDAP server, and validates a user regarding its user ID: