Archive for the ‘Programming & Internet’ Category
Mobile App on Subdomain with Django
I’ve noticed a fairly common pattern arising with mobile and iPhone versions of websites using sub-domains. Clicky is an excellent example of this. They provide an iPhone version of their site at i.getclicky.com and a generic mobile version at m.getclicky.com.
I want to create something similar for Inzolo.com. I assumed that Django, with all its awesomeness [...]
March 3, 2010
Tags: django, iphone, mobile, python Posted in: Programming & Internet
5 Comments
Django: ProgrammingError: Can’t Adapt
I find I get an error like this far too often, but not often enough to remember why I got the problem the previous time. For my own sanity, I’m blogging about it for reference. The error itself is not very descriptive:
Exception Type: ProgrammingError
Exception Value: can’t adapt
Unless there is something I’m forgetting, it seems 100% [...]
January 28, 2010
Tags: django Posted in: Programming & Internet
9 Comments
Basic Authentication on mod_wsgi
I’m currently in the process of creating an iPhone app for Inzolo. This requires an API of course. I wanted to take advantage of what was currently available for Django and I came across wapi. Time is of the essence so I decided to take the easiest route and use basic authentication for now. (I’m [...]
January 11, 2010
Tags: api, authentication, basic auth, djanog, mod_wsgi, piston, wapi, webfaction, wsgi Posted in: Programming & Internet
10 Comments
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 active [...]
December 15, 2009
Tags: Chrome, Google, IE Posted in: Programming & Internet, Technology
29 Comments
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:
from [...]
November 5, 2009
Tags: django Posted in: Programming & Internet
17 Comments
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 file, [...]
September 17, 2009
Tags: cache, IE, jquery, json Posted in: Programming & Internet
23 Comments
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 have [...]
July 31, 2009
Tags: cron, django, python, webfaction Posted in: Programming & Internet
11 Comments
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 date [...]
June 22, 2009
Tags: date, django, range Posted in: Programming & Internet
No Comments
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
Tags: jquery, xhtml Posted in: Programming & Internet
6 Comments
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 problem I [...]
May 21, 2009
Tags: django, jquery, json, python, simplejson Posted in: Programming & Internet
7 Comments



