Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mollyui and mollyrest command line tools
- Loading branch information
1 parent
67dd171
commit 90c77c3
Showing
11 changed files
with
78 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
*.pyc | ||
conf/local.conf | ||
docs/_build | ||
*.iml | ||
*.iml | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[weather] | ||
module = molly.apps.weather | ||
provider.metoffice = molly.apps.weather.providers.metoffice | ||
provider.metoffice.api_key = 12345 | ||
provider.metoffice.api_key = 52d92e14-e005-4929-97b0-6a87674db31d | ||
provider.metoffice.location_id = 3330 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from flask.ext.script import Manager | ||
from gunicorn.app.base import Application | ||
|
||
from molly.rest import flask_app | ||
|
||
manager = Manager(flask_app, with_default_commands=False) | ||
|
||
@manager.command | ||
def start(): | ||
class MollyApplication(Application): | ||
|
||
def init(self, parser, opts, args): | ||
pass | ||
|
||
def load(self): | ||
return flask_app | ||
|
||
MollyApplication().run() | ||
|
||
@manager.command | ||
def debug(): | ||
flask_app.debug = True | ||
flask_app.run(debug=True, port=8000) | ||
|
||
def main(): | ||
manager.run() | ||
|
||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os.path | ||
|
||
from flask.ext.script import Manager | ||
from gunicorn.app.base import Application | ||
|
||
from molly.ui.html5.server import flask_app | ||
|
||
manager = Manager(flask_app, with_default_commands=False) | ||
|
||
@manager.command | ||
def start(): | ||
class MollyApplication(Application): | ||
|
||
def init(self, parser, opts, args): | ||
pass | ||
|
||
def load(self): | ||
return flask_app | ||
|
||
MollyApplication().run() | ||
|
||
@manager.command | ||
def debug(): | ||
flask_app.debug = True | ||
flask_app.static_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'assets')) | ||
flask_app.static_url_path = 'static' | ||
flask_app.run(debug=True, port=8002) | ||
|
||
def main(): | ||
manager.run() | ||
|
||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ gunicorn | |
unittest2 | ||
mock | ||
Flask-Babel | ||
python-dateutil | ||
Flask-Script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.