Django Site(s) updating
Every once in a while I start reading something online and get this wild hair up my rear and decide to do something I usually don’t do, and that’s update software. Recently I purchased James Bennett: Practical Django Projects (Great Book BTW!), which needs a more recent svn checkout then what I was working with. Basically on my Cynic Tees site (which is really in a holding pattern), I had installed Django 0.96 which is kinda old, especially in Django life. So like any good admin, I updated to the new revision 8069.
After doing that I thought that maybe that would be it and I could just go on my marry way. NOPE!, there are a bunch of updates that I needed to do, and I’m lucky I picked a website that doesn’t get a lot of traffic. Had this been my worthless stuff site or Ultimate Guitar Hero, I would have been in big trouble. However, the good news is that I was able to get the site up quickly thanks to the good folks in the Django User group. So here’s what I had to do to get back on my feet.
First things first. I started out by removing the old Django source files and replacing them with a recent svn revision. As of this writing, the most recent version that is working for me is 8074. After I had done that, I expected the site to work as normal, and of course it didn’t. So the first thing I had to do was change the way I was accessing my mysql database. In my settings.py file I still had “mysql_old” which was because I have my sites installed at Dreamhost. So in order to get around this, I had to install my own version of python, which was better anyway because Dreamhost gives you 2.3 and I really need 2.5.
Ok, so I compiled my own version of python, added my own version of mysql_db, changed my settings.py file, ran a syncdb, and I was off and running. But when I visited the site, I was still getting an error, What gives? Well I still needed to change dispatch.fcgi because it was pointing to the old location of python and not the new one I just compiled. So after I changed that, and kill the old python process, I was truly back in business.
One thing that I should also mention. If you are using any image fields, which I was, you’ll also need to install a newer version of PIL, so that you can use those wonderful ImageFields. Ok, so the site is running, so now I need to log into the admin so I can add some content. Oh NO, the admin doesn’t work, so there must be something to that as well. After a bit of reading I discover that some time ago that the admin has changed to the newforms-admin, which I’m currently not using. Reading the tutorial at the djangoproject.com site, I discovered exactly what I need to do. I can’t really explain it better than this site, so read this and I’m sure you’ll be sitting pretty after reading it. I might also mention that I had a issue with django-tagging and Brian Rosner was also the person that pointed me to the right location on how to install the newforms-admin for that.
So after all that excitement, I was totally back in business and wondering what else might creep up after all the upgrading. So far, all looks good. I’m sure there will be more updates later.

























