Update settings and urls to work with django 1.6 or pre django versions.