Commit fea1d3e8 by Xavier Antoviaque

Add instructions to add custom scenarios & don't fail when none exist

parent c6dca82b
...@@ -128,6 +128,17 @@ INSTALLED_APPS += ('mentoring',) ...@@ -128,6 +128,17 @@ INSTALLED_APPS += ('mentoring',)
DATABASES['default']['NAME'] = 'workbench.sqlite' DATABASES['default']['NAME'] = 'workbench.sqlite'
``` ```
Adding custom scenarios in the workbench
----------------------------------------
Create the `templates/xml` and add XML scenarios to it - all files with the `*.xml` extension will be
automatically loaded by the workbench:
```bash
$ mkdir templates/xml
$ cat > templates/xml/my_mentoring_scenario.xml
```
Starting the workbench Starting the workbench
---------------------- ----------------------
......
...@@ -76,6 +76,7 @@ def get_scenarios_from_path(scenarios_path, include_identifier=False): ...@@ -76,6 +76,7 @@ def get_scenarios_from_path(scenarios_path, include_identifier=False):
scenarios_fullpath = os.path.join(base_fullpath, scenarios_path) scenarios_fullpath = os.path.join(base_fullpath, scenarios_path)
scenarios = [] scenarios = []
if os.path.isdir(scenarios_fullpath):
for template in os.listdir(scenarios_fullpath): for template in os.listdir(scenarios_fullpath):
if not template.endswith('.xml'): if not template.endswith('.xml'):
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment