Projects /django-cool-urls
The Django Pony, but blue, 'cause it's cool ;-)

Named for the famous Tim Berners-Lee quote, django-cool-urls is a little library that lets you link to a web page or embedded video from your site, and should that link ever disappear (the site removed the page, or just died altogether, etc.) your site will swap out the external link for a local copy.

Just swap out this:

<a href="https://example.com/">...</a>

for this:

<a href="{% cool_url 'https://example.com/' %}">...</a>

This sort of thing is supposed to be great for SEO, but I mostly wrote it 'cause I was tired of going over old blog posts that linked to things that no longer exist, leaving a post stripped of context.

So, after hacking something together to work *inside* my site, I broke it out into a proper Django module mostly 'cause I thought it might be useful to others... well that and I like to build pretty things, and this code is very pretty.