mirror of
https://github.com/kennethreitz-archive/fablib-api.git
synced 2026-06-05 23:30:19 +00:00
render text
This commit is contained in:
@@ -29,8 +29,13 @@ class Trunk(object):
|
||||
key = self.bucket.new_key(key_name)
|
||||
key.set_contents_from_string(data)
|
||||
|
||||
def get(self, key):
|
||||
return self.bucket.get_key(key).read()
|
||||
def get(self, key, render=False):
|
||||
text = self.bucket.get_key(key).read()
|
||||
|
||||
if render:
|
||||
text = markdown(text)
|
||||
|
||||
return text
|
||||
|
||||
app = Flask(__name__)
|
||||
api = Api(app)
|
||||
|
||||
Reference in New Issue
Block a user