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).
I noticed several problems with the current optimization for relative internal anchors (e.g. #anchor links in the content that are converted to /absolute/internal/url/#anchor):
I forgot to migrate this case to the new usage of check_anchor(), so it raises an exception at the moment
It does not set the new fields for status_code etc...
It is untested
It overrides the builtin hash
Instead of fixing it, I think we can remove this block of code and rely on the following elif self.type == 'internal': to handle this case. Making a request with the test client won't be that much slower than checking the model fields manually I guess.
I noticed several problems with the current optimization for relative internal anchors (e.g.
#anchor
links in the content that are converted to/absolute/internal/url/#anchor
):check_anchor()
, so it raises an exception at the momentstatus_code
etc...hash
Instead of fixing it, I think we can remove this block of code and rely on the following
elif self.type == 'internal':
to handle this case. Making a request with the test client won't be that much slower than checking the model fields manually I guess.