The right tool for the job is sometimes not the right one afterall.
It amazes me sometimes that software religious fanaticism is still rampant in this day and age of “there is no right way to do something as long as it works”. I ran headlong into this today while twittering.
This site is running a development version of Django, and as such there are sometimes major changes to the codebase that you have to compensate for. One such change was the recommendation to move from Apache running mod_python to mod_wsgi. It was a relatively painless changeover, but I just couldn’t get the admin media files (the admin site has a library of javascript, css, and template files that it needs to find to make itself look pretty) to be found.
So I twitter this:
“trying to bring the django admin site back to life with mod_wsgi, while the documentation is still talking about mod_python.”
a user tweets back helpfully: “why fighting with mod_wsgi? We use fastcgi: apache is such a mess!”
As much as I love people who wish to help, one must always try to determine the problem before offering a solution as illustrated by the next tweet: “Point is that using simple nginx + fcgi makes things straightforward, slim and light. What exactly where problems with admin?”
So there you have the religious “the software I use is best” mindset that I was referring to. A simple fix really shouldn’t require a completely new webserver install. What was the simple fix you ask? It was to simply cut and paste an AliasMatch line in the VirtualHost file a few lines up in the configuration. Two combo-keystrokes.
So this site is happily chugging along without having to learn to install, configure and run a new webserver daemon. Is it the best solution? probably not. Does it work as intended? Absolutely! Sometimes the best tool for the job isn’t the best_ , it all depends on what gets the job done.