diff --git a/README.md b/README.md index a6146bd..c75d36d 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,11 @@ To enter some examples in the database, do this: ./manage.py fill_examples --dir=resources/example/hello_world ``` +To enter many examples in the database where the examples are listed in a yaml file, do this: +```sh +./manage.py fill_examples --conf=resources/test_conf.yaml +``` + To enter some books in the database, do this: ```sh ./manage.py fill_books --dir=resources/books/example diff --git a/design/notes.txt b/design/notes.txt index 4aed3a6..55d0a3d 100644 --- a/design/notes.txt +++ b/design/notes.txt @@ -38,7 +38,7 @@ curl -H 'Accept: application/json; indent=4' http://127.0.0.1:8000/examples/ --h # Import Yannick's examples # ############################# -# TODO: add a facility to do this +# TODO: add a facility to do this (see better method below) # Setup: cd resources ; git clone https://github.com/AdaCore/Compile_And_Prove_Demo.git @@ -48,6 +48,13 @@ cd resources ; git clone https://github.com/AdaCore/Compile_And_Prove_Demo.git list="hello_world absolute_value bitwise_swap saturate_angle sensor_average strings communications landing_procedure" for a in $list; do ./manage.py fill_examples --dir=resources/Compile_And_Prove_Demo/examples/$a ; done +################################################ +# Import Yannick's examples: The Better Method # +################################################ + +./manage.py fill_examples --remove_all +./manage.py fill_exmaples --conf=resources/test_conf.yaml + ################ # Import books # ################