Add a solutions directive. This would leverage the label feature of the exercise so that you can only have one unique solution for each exercise and you link them by label (after parsing warnings will be issues for any duplicate labeled solutions or any solutions missing an exercise).
You would control the inclusion of the exercises using a config option in conf.py exercise_include_solutions where the default value is False
Add a solutions directive. This would leverage the label feature of the exercise so that you can only have one unique solution for each exercise and you link them by label (after parsing warnings will be issues for any duplicate labeled solutions or any solutions missing an exercise).
You would control the inclusion of the exercises using a config option in conf.py
exercise_include_solutions
where the default value is False