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).
BSD 3-Clause "New" or "Revised" License
75 stars 26 forks source link

Refactor `status` field of `Url` model #161

Closed timobrembeck closed 1 year ago

timobrembeck commented 1 year ago

In my opinion, this looks a bit cleaner

claudep commented 1 year ago

Yes, probably cleaner. Just need to make tests pass :smile:

timobrembeck commented 1 year ago

Ah, removing self.status = False broke the tests, because it relied on the fact that the default status was False if not overridden. I find it a bit easier to follow the nested if-conditions in the checking methods if we use None as default value and set True and False explicitly...