diff options
Diffstat (limited to 'wqflask/wqflask/docs.py')
-rwxr-xr-x | wqflask/wqflask/docs.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py new file mode 100755 index 00000000..65255987 --- /dev/null +++ b/wqflask/wqflask/docs.py @@ -0,0 +1,15 @@ +from __future__ import absolute_import, print_function, division + +from flask import g + +class Docs(object): + + def __init__(self, entry): + sql = """ + SELECT Docs.title, Docs.content + FROM Docs + WHERE Docs.entry LIKE '%s' + """ + result = g.db.execute(sql % (entry)).fetchone() + self.title = result[0] + self.content = result[1] |