Part of Javascript code back to base.html for use of url tag