Slaptijack Title

Archive for 2010

23 Cheap VPS Providers

I've assembled this list of 23 cheap VPS providers. My criteria for "cheap" was $20 or less per month. I've made the table sortable so that you can see the list sorted by the criteria that is most important to you. You can sort on multiple columns by hold down the Shift key when clicking.

Categories: IT Management

Python: Convert String Date to Date Object

Occasionally, you may run across a date in a format that can't be easily loaded into a Python date object. For example, I recently had a situation where a file I was parsing was full of dates in this format: 7/7/2008.

Categories: Programming

Combining Multiple Models Into One Context Variable

I'm not sure if the title of this post accurately describes the problem. I have a situation where I have very similar models that I want to display in one table. As you know, querysets are limited to a single model, so it isn't possible to have a single context variable use a single queryset. In my case, I could have created a new context variable for each model, but that results in a situation where adding a new model means changing both the view and the template.

Categories: Programming

Django + jQueryUI Tabs: Open a Specific Tab on Page Load

I recently created a page that had different tabs using the jQueryUI Tabs widget. For whatever reason, I would occasionally want to show a specific tab on page load rather than the default initial tab. One way to do this is to set a variable in your view context and then use jQuery to open the right tab.

Categories: Programming

Django Debug Toolbar Multiple Database Support

Django Debug Toolbar (DjDT) is a must-have tool for most Django developers (at least the ones I know!). One of the most useful features of DjDT is the SQL Debug Panel that displays information about SQL queries including execute time and EXPLAIN output.

Categories: Programming