No way you are constructing URLs on the server side manually! While I might look over that in client code, on the server side you should use [reverse](https://docs.djangoproject.com/en/1.4/topics/http/urls/#reverse).