Django 1.5 compatibility

Updates needed for `url` and `adminmedia` template tags.