Dynamically Adding Workout plans/Exercises

I am trying to figure out how to create a form that will allow me to create a workout plan for clients.

The models will hold:

  1. Plan
    a. Day
    I. Exercise | Reps | Sets | Text | Link

I want a form that creates one Plan and within that plan have the ability to add and remove groups (Days) with numerous exercises within each Day,

So create 1 Plan. then an “Add Day” button and when that day is added a “Add Workout” button inside the day.

The goal would be to create one plan, many days and many exercises in each day.

I can write the models and already have that in the works. But any direction on how to best do the above would be great. I apologize for the lack of code examples. I’m just starting down this path and thought I would ask for any advice or direction I should take before I go too far down the wrong rabbit hole. Thank you in advance.

Django has a facility for managing multiple instances of a form for a model on one page, formsets.

If you want the page to be updated without performing a full-page refresh, you’ll need to write some JavaScript to update the page.