Closed jadewang425 closed 1 year ago
What is the error?
I'm not sure what I did but I can't see any options from the dropdown list anymore...
I got it back! here's the message
Can you also share the view.py thats responsible for adding an exercise. Did you add the exercise_id in the form.is_valid() section?
I'm not sure if using the form is the best way to go, but when I tried with the associate function similar to associating toy to a cat, it doesn't let me iterate the exercises for the dropdown list
If you print exercise_id
are you getting a number back?
No, I'm not getting the number back and it doesn't print in the terminal as well.
Ok, then you may want to try adding in a bunch of exercises then associating them like we did with cats and toys using the assoc_toys method
Describe the bug A clear and concise description of what the bug is. I created a form with a drop down list to associate exercises with a workout, but I'm not quite sure how to
What is the problem you are trying to solve? associate exercise(s) to workout
Expected behavior A clear and concise description of what you expected to happen. select the exercise(s) from the drop down list, and add to the workout
What is the actual behavior? A clear and concise description of what actually happened. getting an error page and exercise(s) not added
Post any code you think might be relevant (one fenced block per file)
What is your best guess as to the source of the problem? in the function in views or in the html file
What things have you already tried to solve the problem? different functions or looping over the exercises available
Additional context Add any other context about the problem here.
Paste a link to your repository here https://github.com/jadewang425/gym_grid