Browse Source

adding web app

master
Julio Biason 11 years ago
parent
commit
f525206bc1
  1. 20
      lyrics/__init__.py
  2. 24
      manage.py
  3. 3
      requirements.txt

20
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()

24
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()

3
requirements.txt

@ -0,0 +1,3 @@
flask
Flask-Script
pony
Loading…
Cancel
Save