From f525206bc12b67c6c342eae280bf69bda6343e9f Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 17 Jul 2013 17:02:21 -0300 Subject: [PATCH] adding web app --- lyrics/__init__.py | 20 ++++++++++++++++++++ manage.py | 24 ++++++++++++++++++++++++ requirements.txt | 3 +++ 3 files changed, 47 insertions(+) create mode 100644 lyrics/__init__.py create mode 100644 manage.py create mode 100644 requirements.txt diff --git a/lyrics/__init__.py b/lyrics/__init__.py new file mode 100644 index 0000000..5cc1e38 --- /dev/null +++ b/lyrics/__init__.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from flask import Flask + +import logging + +# ---------------------------------------------------------------------- +# Start up +# ---------------------------------------------------------------------- + +_log = logging.getLogger('lyrics') + +app = Flask(__name__) + +# ---------------------------------------------------------------------- +# Start as application +# ---------------------------------------------------------------------- +if __name__ == '__main__': + app.run() diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..c786ccb --- /dev/null +++ b/manage.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from flask.ext.script import Manager +from flask.ext.script import Server + +from lyrics import app + +import logging + +# starts the logging service, always +if __name__ == '__main__': + logging.basicConfig(level=logging.DEBUG, + format='%(levelname)s:%(name)s ' + '[%(funcName)s:%(lineno)d]:%(message)s') + + +manager = Manager(app) + +manager.add_command('runserver', Server(use_debugger=True, + use_reloader=True)) + +if __name__ == '__main__': + manager.run() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..356f50c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +flask +Flask-Script +pony