So I am new to django I have been working on PHP CodeIgniter in which to put absolute URL in href I used a function called `base_url` by calling URL helper  

```
<?php echo base_url().'user/login';?>

```

which gives output something like

`http://localhost/projectname/user/login`  

I want the same thing in Django but haven't got any answer or answer which I could understand. I don't want to use relative URL and my expected result is should be something like this  

```
{% url 'login' %}

```

above code should return   

`http://localhost/projectname/user/login`