Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Don't Know how to fix Duplicating of Django Url Path in Search bar [closed]

$
0
0

I am doing Cs50web course and working on a project using Django. So, I have created a path in urls.py of application and It has two request Get and PostIt's a form page. Where you can add the Title, Content and a button to save:

form page

On encyclopedia/newpage as get request page get's open and on http:///encyclopedia/newpage url as a post request page get saved. However, When page is open in the browser as http://127.0.0.1:80000/encyclopedia/newpage by clicksave button the url becomes http://127.0.0.1:80000/encyclopedia/newpage/newpage and shows an error.

newpage.html imagenewpage.html

urls.py imageurls.py

views.py imageviews

The problem in browser example:post request after clicking save button, instead of loading newpage it ads another newpage/newpage and shows an Errorafter post request


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>