Status update added.

This commit is contained in:
Nicholas Staples
2016-01-29 14:41:07 +00:00
parent 5f7b9fed3a
commit bed1116587
5 changed files with 49 additions and 4 deletions

10
app.py
View File

@@ -1,7 +1,7 @@
import os
from flask.ext.script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
from app import create_app
from app import (create_app, get_app_version)
application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'development')
@@ -17,5 +17,13 @@ def list_routes():
print("{:10} {}".format(", ".join(rule.methods - set(['OPTIONS', 'HEAD'])), rule.rule))
@manager.command
def app_version():
"""
Retrieve the version of the api.
"""
return get_app_version()
if __name__ == '__main__':
manager.run()