django should support named dynamic links. These should probably be used. https://docs.djangoproject.com/en/dev/topics/http/urls/#reverse-resolution-of-urls