#NEWLINE# def redirect_to( request , url , **kwargs ) : #NEWLINE# #INDENT# "\n    Redirect to a given URL.\n\n    The given url may contain dict-style string formatting, which will be\n    interpolated against the params in the URL.  For example, to redirect from\n    ``/foo/<id>/`` to ``/bar/<id>/``, you could use the following URLconf::\n\n        urlpatterns = patterns('',\n            ('^foo/(?P<id>\\d+)/$', 'django.views.generic.simple.redirect_to', {'url' : '/bar/%(id)s/'}),\n        )\n\n    If the given url is ``None``, a HttpResponseGone (410) will be issued.\n    " #NEWLINE# if ( url is not None ) : #NEWLINE# #INDENT# return HttpResponsePermanentRedirect ( ( url % request ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return HttpResponseGone ( )