aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/docs.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/docs.py')
-rwxr-xr-xwqflask/wqflask/docs.py15
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]