link reference doesnt work

I’m encountering some difficulties with the sick form I’ve developed for the Dunkinportal. The form itself is very basic, designed to send emails to both the user and an administrator upon submission.

Issue 1: Incorrect URL in Form Action

  • In sickform.html, the code <form action="{% url 'submit_sickform' %}" method="POST"> does not work as expected.
  • However, when I change it to <form action="/submit_sickform/" method="POST">, the form submission starts functioning.
  • I’m unsure why the URL reverse ({% url 'submit_sickform' %}) is not resolving correctly.

Could you please assist me in resolving these issues?

Thanks

Welcome @muhammadinam9 !

Please post your url definition(s) for submit_sickform.

Also, please be more specific with your problem description. Saying that it “does not work as expected” is not telling us what is happening, or what you are expecting to have happen.

If you’re getting an error message in your server console, please post that along with the complete traceback. (Do not post screen images, copy/paste the text into the body of your post.)