Slap me silly. I went through my recent apache logs tonight to focus on a known issue; I’ve been through multiple backends with this website, and I’ve kept all the data…but my URLs have gone brokey as I switch. An example; what is now at
used to be at
Same post, different URL. And that’s happened more than once. I’ve had a zope backend twice, a flat file backend, and a different database-backed backend than I do now. That I can remember offhand. Ouch. Zoinks, even.
Since I can be anal about this sort of stuff (vs. many other things that I am definitely NOT anal about), I’ve been careful enough to keep the numeric ID values of the old urls around (usually in the relevant db record). And I’ve always figured, I can just whip up some redirects as I identify bad requests from my logs. How hard can it be?
(while unconsciously dreading the potential ickiness).
Luckily, with Django, it is indeed freakin’ trivial. I tracked down my first one (in fact, the example above), and ended up with approximately 5 lines (one of a regex and Django view call, 4 in the called function) to fix it. This shit is awesome!! Fixing these will actually be fun!
Have I mentioned I love Django? *grin*