Not too long ago at work, we added a few more servers to our production deployment to speed things up – however, this made deploying code changes a bit more complicated, as you had to remember to update several servers every time. I decided to look into Capistrano, which I’d heard about before, and am glad to say it’s working very well, once I managed to figure it out.
Continue Reading Deploying Projects With Capistrano…
Not much text to put in this post, I just want to show a few useful things you can do with a ModelForm in django, so I can quit retyping examples
Continue Reading Useful form tricks in Django…
Today my blog was hacked, erasing the most recent post in favor of spam links. Thankfully, I was able to recover it from Google’s cache, but I’m tired of all the issues maintaining my own blog.
As a result, I’ve decided to move my blog here, so that I don’t have to deal with the hassle anymore.
A common problem I see when helping people in the Django IRC channel is people who are trying to create or edit multiple objects, but for some reason try to make a single form object to deal with them – this makes things quite convoluted and much harder than they have to be. My goal here is to explain a much simpler method using multiple form objects.
Continue Reading Editing multiple objects in Django with forms…
Earlier today, in #django on freenode, the topic of tab-complete in the python shell happened to come up – at first, I thought it wasn’t possible in standard python, and only in other python interpreters.
Thankfully, a link was posted with info on the readline and rlcomplete modules – at first, I couldn’t get their example working to load on startup, so upon further investigation, not only did I get that quirk worked out, but I stumbled across another module that lets you hook on start/exit to save/load a history file, much like bash.
One of the few things I disliked about Visual Studio 2005 is the new Ctrl+Tab menu they added, which works sort of like Alt-Tab in Windows, but is fairly useless in an IDE – it just slows down Ctrl+Tab operation by requiring you to release both Control and Tab each time you want to change documents, so you can’t just hold Control and quickly Tab through open documents.
Thankfully, today I found out how to disable that – Tools > Options, then Environment > Keyboard. Once there, remove the bindings for Window.NextDocumentWindowNav and Window.PreviousDocumentWindowNav, then assign Ctrl+Tab to Window.NextDocumentWindow and Ctrl+Shift+Tab to Window.PreviousDocumentWindow – hit OK, and you’re good to go