Slashes Suck
Once again, a kind soul in #django (Kanashii) picked up a basic error on my part that resolved the repeated underscores issue. When you declare an ImageField in Django, you have to define where it should be uploaded to, and I had done this, like so: myImage = ImageField(upload_to=”/mysite”).
Everything looks fine, the docs just say to put the subdir under MEDIA_ROOT (where Django looks for images and css etc.) so I didn’t give it much thought. Except, as my IRC advisor noted, the slash means that it will be treated as a path from root, and that way lies disaster. I removed the slash and everything was fine… well, I moved onto the next error, anyway. I’ve lost track of the amount of time I’ve lost to errors surrounding slashes. Missing slashes, un-wanted slashes, forward instead of backward slashes. The bloody things are everywhere and I appear to be especially prone to confusion surrounding them.
Still, the image processing on save in the admin page is working now, which lets me get on with making sure that the overall model makes sense. I’ve already had to blow away my database tables a couple of times, and I’m missing the Rails migrations a lot. Hopefully the design will settle down reasonably quickly to the point where dropping all and syncing isn’t happening a few times an hour. Or the migrations for Django will turn up. Either would be good.

