When i access the first page the information is shown correctly.
When i post to second form, view code is executed but i end my view code with a render of the first page: return render(request, 'rxWod/edit_routine.html', context)
The page is shown correctly with the updated data but the url remains the second one.
I can think of at least four ways of doing this - but it kinda depends upon why you need the URL changed.
If it’s just because your form in edit_routine needs to submit to edit_routine, you could set the action attribute on the submit button to make the form submit to edit_routine regardless of which URL rendered that form.
You could pass the necessary parameter as a query parameter in the url. (e.g. redirect('edit_routine?id=12345')
You could stash the current id in the user’s session to be accessed by the view handling edit_routine.
Thank you very much for your response, i am new in web programming world and i am reading about each option, i have a lot of to learn.
My first think is that the 3 option is the most appropiate for me.