Skip to content

CLI Commands

Davy Peter Braun edited this page Jan 12, 2017 · 2 revisions

Table of contents

Synopsis

Trustlab implements its own CLI commands to improve the workflow. A Django application called trustlab exists within the root folder, and holds the code for the commands. These classes are proxies for the actual scripts operating in the background.

You can see the list of commands by running otree in your console. They are listed at the very bottom, under the [trustlab] section.

Commands

  • otree deploy <locale_code> — Given a two letter locale code (e.g. fr, en), will checkout the matching git deployment branch, rebase master onto it, push the commits to the remote (thereby triggering a deployment of the server if you use a webhook for instance), then checkout back to the master branch.

  • otree exportstatic — Will copy the exports from the animated simulations into the corresponding subfolders of the STATIC_ROOT directory, before running otree collectstatic to prepare static files for deployment. It's safe to use this instead of otree collectstatic.

  • otree iatexport <csv_input_file> — Runs the (deprecated) IAT CLI data exporter against a given CSV input file, and save the resulting files to the export_iat folder.

  • otree locales <command> — Given a command (either "make" or "compile"), will run makemessages or compilemessages for all locales through all relevant apps.

Clone this wiki locally