django2 报错:
TypeError: RedirectView() received an invalid keyword 're_path'. as_view only accepts arguments that are already attributes of the class.
解决办法:
from django.views.generic.base import RedirectView # favicon.ico
# favicon_view = RedirectView.as_view(re_path='/static/images/zhuo_64x64.ico', permanent=True) # django 1.11
favicon_view = RedirectView.as_view(url='/static/images/zhuo_64x64.ico', permanent=True) # django 2.2