Use url template tag instead of hard-coded URL

It is a good practice to use DRY principle but also this is needed to deploy the application in a subpath.