Merge pull request #153 from EverythingMe/feature_data_source

Shell wrapper to source env before running command
This commit is contained in:
Arik Fraimovich
2014-03-25 10:25:12 +02:00
3 changed files with 12 additions and 3 deletions

View File

@@ -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

3
bin/run Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
source .env
"$@"

View File

@@ -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."""