1

Is it possible to change the form action url depending on the choice user selects. Let's say he wants to create a dictionary. If he selects the choice that he wants to map the term to an existing dictionary word then go to url X else he wants to create a new term go to url Y.

The second part is if in case he wants to map the term with existing dictionary word then there can be another form with term suggestions. SO there should be nested form structure.

1 Answer 1

1

You can go to one view, do some logic, and then redirect to another view like this: https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#redirect

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.