URL configuration in Django

时间:2018-12-03 13:16:57

标签: python django python-3.x django-templates

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?

1 个答案:

答案 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>