Skip to content

Instantly share code, notes, and snippets.

View kkappel's full-sized avatar
🏠
Working from home

Klaus Kappel kkappel

🏠
Working from home
View GitHub Profile
@kkappel
kkappel / web2py_env.py
Last active August 29, 2015 14:16 — forked from aabril/web2py_env.py
'''
this snippet is used to load a web2py with postgresql environment
you must install web2py (so gluon.*) from pyeggs : "pip install web2py"
it will read your db.py models from the same directory
'''
# web2py env
from gluon.shell import exec_environment
import psycopg2
from gluon import DAL, Field
from gluon.template import render