Archive for the ‘Programming & Internet’ Category

Fixing IE Issues

This morning for whatever reason I was loathing IE. I hadn’t done any development work all weekend so I don’t even know why it was on my mind. In any case I had an epiphany of sorts. Despite being totally proprietary, IE seems to be the most easily exploited browser due to its support of [...]

December 15, 2009 · Dustin · 37 Comments
Tags: , ,  · Posted in: Programming & Internet, Technology

Copy Model Object in Django

I ran into a situation where I wanted to created a new database record from an existing record (model object). I figured there should be a fairly simple solution. It turns out there is and I want to thank Seveas on IRC #django for pointing it out for me. This is essentially what I did: [...]

November 5, 2009 · Dustin · 23 Comments
Tags:  · Posted in: Programming & Internet

IE & JSON Caching Bug

I came across a weird bug. It seems that IE is the only browser that has a tendency insists on caching JSON results. I created a little api call that returned a list of users “favorites”. I use jQuery to retrieve this list and make updates to my site. Well apparently IE caches the JSON [...]

September 17, 2009 · Dustin · 25 Comments
Tags: , , ,  · Posted in: Programming & Internet

Django cron on Webfaction

James Bennett addresses one of the most frequently asked questions in Django – “How do I write a standalone script which makes use of Django components?” That is what I needed to do. I’m still learning Python so I wasn’t sure why the methods he described in his article didn’t work for me. (OK, I [...]

July 31, 2009 · Dustin · 12 Comments
Tags: , , ,  · Posted in: Programming & Internet

Django: Filter Model on Date Range

I’m sure this is in the documentation *somewhere* but it wasn’t totally obvious to me and I knew there had to be an easy way to filter a model based on a date range. I’m in the process of filtering transactions for Inzolo and giving the user options for the following date filters: Month to [...]

June 22, 2009 · Dustin · Comments Closed
Tags: , ,  · Posted in: Programming & Internet

XHTML Strict Anchor Target Fix with jQuery

Since switching from HTML to XHTML, one of the things that kills my HTML Validator most is when I get lazy and put a target="_new" or target="_blank" in an anchor tag. So then I have to go back and fix them and find the old sitepoint article that describes how to fix the problem with [...]

June 5, 2009 · Dustin · 7 Comments
Tags: ,  · Posted in: Programming & Internet

Django & Djson… er, JSON

I must admin this is my first attempt at even using JSON. I wanted to produce some data that I could consume with jQuery and I figured JSON was the best format for the job. I found Django has a method for serializing Model query sets easily and it seemed to work just fine. The [...]

May 21, 2009 · Dustin · 7 Comments
Tags: , , , ,  · Posted in: Programming & Internet

One Click Django Project Publishing

I was reading The Joel Test and I got to number #2 which says "Can you make a build in one step?" My initial thought was that there aren’t really builds per se in web applications (unless you use ASP.NET). But then I thought, I wonder if I could make publishing my Django application a [...]

May 15, 2009 · Dustin · 18 Comments
Tags: , , , , , ,  · Posted in: Programming & Internet

Webfaction Review

I was looking at my web stats and noticed I was getting a lot of traffic to my limited review of Webfaction. To recap, I tried out there account then decided to cancel, and they were prompt and friendly at delivering a refund. Since that time, I have set up two Webfaction accounts. When I [...]

May 15, 2009 · Dustin · 69 Comments
Tags: , , , , ,  · Posted in: Programming & Internet, Web Sites

One Liner to Decompress tar.gz Files

For some reason I can never seem to remember this one liner so I generally have to look it up, or decompress the gzip files, then untar. So I’m documenting it here for my own future reference. (Yeah, Linux experts, keep laughing at me!) tar xzvf my_dir.tar.gz my_dir

May 14, 2009 · Dustin · 7 Comments
Tags: , ,  · Posted in: Programming & Internet