made more flexible url's in templates and views