0

Good afternoon,

I built a django form for my thesis work that I intend to interviewees. To make it more appealing and increase the number of answers (I hope! :)) I built a page using a tutorial on react. It looks very nice. The problem is that building my form with react looks like a nightmare.

So I would like to have a button on my react page that once clicked redirect to my django html page with the form. I looked online but none of the topics I found did the trick (React-Router External link, react-router redirect to a different domain url, react button onClick redirect page).

I would like to have something like:

<NavBtnLink to="http://127.0.0.1:8000/doctor/7f06cb1c-d68e-459e-9d07-ce4d52d2b50b/survey/%22%3ETake the survey</NavBtnLink>

but that tries to redirect me to:

http://localhost:3000/http://127.0.0.1:8000/doctor/7f06cb1c-d68e-459e-9d07-ce4d52d2b50b/survey/

instead of:

http://127.0.0.1:8000/doctor/7f06cb1c-d68e-459e-9d07-ce4d52d2b50b/survey/

Any idea of things I could try (on top of what is suggested in the mentionned topics?

Ivan Starostin
  • 8,798
  • 5
  • 21
  • 39
eric.p999
  • 33
  • 5

1 Answers1

1

So in this case , you are not needing the power of react router .

Keep it simple and only use html a tag

 <a href="your link here">Take the survey</a>
Yassine CHABLI
  • 3,459
  • 2
  • 23
  • 43
  • Awesome! It works like a charm. Completely forgot to try that. I tried Link but not that one. Thank you. – eric.p999 Mar 15 '22 at 07:16