DjangoAdminHackers / django-linkcheck

An app that will analyze and report on links in any model that you register with it. Links can be bare (urls or image and file fields) or embedded in HTML (linkcheck handles the parsing). It's fairly easy to override methods of the Linkcheck object should you need to do anything more complicated (like generate URLs from slug fields etc).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Following redirects

andybak opened this issue · comments

I'm trying to reconstruct my thinking for accepting #43 - I can understand being consistent is good but it seems to me now that the correct behaviour is to follow redirects for both external and internal links.

Assuming we put sensible limits in place to stop long or infinite redirect chains - what reasons are there not to follow redirects? I'm happy to leave the default as it is - but at the very least I'd like to add a documented setting to follow all redirects.

@claudep - the original PR was yours. What are your thoughts?

I think it's important to know when an internal link redirects (you may want to update obsolete links at some point). Otherwise, it looks like a normal link and you may miss a possible issue.

However, checking the redirect target might add value to the message. Adding a second check with follow=True if it's a redirect response could be nice.

Sounds like a new view or a filter on an existing view might be in order.

I'll provide a suggestion