Greg Aker

A Django Podcast

Filed in: Announcements, Django

May 7, 2012

Along with fellow jazz musician and Djangonaut Bryan Helmig, I dropped the first episode of A Django Podcast this afternoon on 3rd Avenue Radio

We think we have some interesting things in store. If there's anything you'd like to have covered, please don't hesitate to tweet us @DjangoPodcast.

Special thanks to Matt Wilson for giving us permission to use his tune The Scenic Route off of his record aptly titled The Scenic Route. Matt's records are nothing but sonic love and you should check them out!

Read More

iPhone Simulator in Xcode 4.3.2

Filed in: web-dev

May 6, 2012

The iPhone simulator is kind of hidden in Xcode 4.3.2. If you need it to check websites you are working on in an iOS device, you can setup a symlink to put it in your /Applications directory.

Run the following in your terminal.

ln -s /Applications/\ /Applications/iPhone\

Read More

How does Django's class-based ListView work?

Filed in: Django

April 20, 2012

Yesterday we looked at the generic class-based TemplateView. For this installment of looking under the hood at Django class-based views, let's look at the List View. (take a peek at that class now)

Check it out, there's nothing to it, or is there?

It subclasses BaseListView and mixes MultipleObjectTemplateResponseMixin. Let's visualize how that works.


subclasses: TemplateResponseMixin

methods: get_template_names

class properties: template_name_suffix

This is pretty straightforward. We know what TemplateResponseMixin does, so we can skip that.

However, look at get_template_names() in that mixin. It looks at the type of object we pass to it, and tries to ...

Read More

How do Django class-based views work?

Filed in: Django

April 19, 2012

Django version 1.3 released new generic class-based views. While these are wickedly cool, some of the documentation is a bit hard to see exactly what you can do with them. How about some simple use cases and dive into the code so we can learn how these work.

Let's start by reviewing what is in the documentation. We'll replace django.views.generic.simple.direct_to_template with django.views.generic.TemplateView.

We can directly replace it in like so:

from django.conf.urls.defaults import patterns, url
from django.views import generic

urlpatterns = patterns('',
    url(r'^about ...

Read More

Debugging Python with pdb or ipdb

Filed in: Python, VideoBlobbing

April 5, 2012

Python has a wonderful debugger called pdb you should use if you aren't already. If you're like me and prefer to not use an IDE, you could have a mess of print statements as you try to debug things. If you don't know about it, you should be using pdb. It makes debugging a far nicer experience.

Here's a little script I came up with to remove odd numbers from a list.

import unittest

def remove_odd_numbers():
    my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    for item in my_list:
        if item % 2 == 1:
           my_list ...

Read More

Is scrum a sham?

For most small companies, I think it is.

Filed in: Blobbing

March 29, 2012

An interesting post came out yesterday about how Agile is a sham. I've been on a few teams that have used agile development methodologies and in my experience, it just doesn't work. These methods try to make developers believe they have total control over the developement of a product. To me, that is the sham. However, I do see some valid situations to use these processes.

In full disclosure, I've never been on a product team with 20, 100, or even a 1000 developers that subscribe to agile techniques. However, I know quite a few developers who ...

Read More

oAuth & the 37 Signals API

Filed in: Python, Django

February 25, 2012

I started what was supposed to be a quick and fun Django project using the Basecamp API. The lack of documentation in their API makes me want to punch a litter of puppies. (This is a joke, puppies are the best)

To help prevent you from punching puppies and rather than trudge through their APIs Google Group, here's what I've figured out. I'm using Python Requests because it's fantastic. If you don't use it stop the insanity, and make your life easier by using it. Additionally, my code examples are within the context of Django ...

Read More

Tools I use

Filed in: Blobbing

January 26, 2012

Because everyone is doing it. Kenny Meyers and Jeff Croft posted about what tools they use on a daily basis. I want to join the crowd. So here are the tools/programs I use on a daily basis.


I have to earn my keep somehow. This is the perfect tool to track my time and make sure I'm billing fairly. At my first go-around at an agency, time keeping was the bane of my existence. Harvest makes it stupidly easy and I'm not wasting billable time keeping track of my time.

A good part of ...

Read More