I have a Django project in which the HTML page has a simple GitHub link.
<a href="www.github.com">Github</a>
When I click on it, the URL it gets redirected to is "localhost/app/github.com"
Can you please explain why is it happening and what should I do to correct it?
答案 0 :(得分:3)
This has nothing to do with Django, but is standard HTML.
You need to put the full URL, including protocol:
<a href="https://www.github.com">Github</a>