From 880412da940f1c610a27d76c42e835fed6539bc0 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Tue, 25 Mar 2014 10:19:11 +0200 Subject: [PATCH 1/3] Remove migrate make command --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 101989399..4e44ebb23 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,5 @@ pack: upload: python bin/upload_version.py $(FULL_VERSION) $(FILENAME) -migrate: - source .env && PYTHONPATH=. python $(MIGRATION) - test: nosetests --with-coverage --cover-package=redash tests/*.py From eade74ffb00eb175a088a42edd3798e1c1c87846 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Tue, 25 Mar 2014 10:19:21 +0200 Subject: [PATCH 2/3] Add manage.py command to print settings --- manage.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manage.py b/manage.py index db83c9b67..a9c91c61f 100755 --- a/manage.py +++ b/manage.py @@ -52,6 +52,15 @@ def runworkers(): def make_shell_context(): return dict(app=app, db=db, models=models) +@manager.command +def check_settings(): + from types import ModuleType + + for name in dir(settings): + item = getattr(settings, name) + if not callable(item) and not name.startswith("__") and not isinstance(item, ModuleType): + print "{} = {}".format(name, item) + @database_manager.command def create_tables(): """Creates the database tables.""" From 870cc142a9fda43e5f1378f866329dbc4990d908 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Tue, 25 Mar 2014 10:22:50 +0200 Subject: [PATCH 3/3] Shell wrapper to source env before running command --- bin/run | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/run diff --git a/bin/run b/bin/run new file mode 100755 index 000000000..eb7f5ff21 --- /dev/null +++ b/bin/run @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +source .env +"$@"