With the addition of generic views, we can easily do a redirect from urls.py. Simply pass the url to the RedirectView and that’s it.
url(r'^my/old/url/$', RedirectView.as_view(url=reverse_lazy('new_url'))) |
With the addition of generic views, we can easily do a redirect from urls.py. Simply pass the url to the RedirectView and that’s it.
url(r'^my/old/url/$', RedirectView.as_view(url=reverse_lazy('new_url'))) |