oTree-org/oTree — pull request #28 by gregmuellegger (2014-11-27 11:15:45+00:00)
Title: Streamline otree script

As discussed, the ./otree script should be as simple as a usual manage.py script.

This PR now includes the new ./otree script which is the same as the manage.py, but includes a workaround for the issue we had with celery on windows. See https://github.com/oTree-org/otree-core/issues/253 for more details. A quick test showed that `./otree celery worker` (when otree-core is in the timeline branch) now runs without errors.

Additionally the `recreate` command for local installations can now be run as `./otree resetdb` but this requires the most recent master of otree-core since this is now implemented as a management command.
The recreate for the server moved into the `./otree-heroku` script. For example: `./otree-heroku resetdb production`.

The `commit_and_push` feature went away as discussed. That's also a reason why I think that `resetdb` is a better fit for the old `recreate`. The recreate did also perform a `commit_and_push` when applied to the server. But it now really only does what it says, it's resetting the database.

As the `./otree-heroku` will grow and integrates more subcommands (at the moment there is only `resetdb` and `help`) we should consider using a different argument parsing library. I can recommend the [`click` library](http://click.pocoo.org/3/) which is especially designed for scripts that utilize subcommands as we do.