markdown.py
@environmentfilter
def markdown(env, value):
"""
Markdown filter with support for extensions.
"""
try:
import markdown as md
# THIS PROJECT IS AN EXAMPLE APP. SOME CODE MAY NOT BE ACTUALLY USEFUL | |
# FOR DEMONSTRATION PURPOSES ONLY | |
# YOUR MILEAGE MAY VARY | |
# Requirements are Flask, Flask-WTF, Flask-SQLAlchemy | |
import os | |
from flask import (Flask, | |
Blueprint, | |
redirect, |
markdown.py
@environmentfilter
def markdown(env, value):
"""
Markdown filter with support for extensions.
"""
try:
import markdown as md
[defaults] | |
hash_behaviour=merge | |
roles_path=../common/roles:./roles | |
host_key_checking=False | |
pipelining=True |
from sqlalchemy import create_engine, MetaData | |
from sqlalchemy.ext.automap import automap_base | |
from sqlalchemy.orm import sessionmaker | |
def create_sa_connection(connection_string): | |
""" A nice helper function for creating the session and engine required | |
for sqlalchemy interactions with the database. | |
:param connection: | |
:return: |