A Django Podcast
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!
iPhone Simulator in Xcode 4.3.2
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
Run the following in your terminal.
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app
How does Django's class-based ListView work?
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?
BaseListView and mixes
MultipleObjectTemplateResponseMixin. Let's visualize how that works.
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 ...
How do Django class-based views work?
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
We can directly replace it in
urls.py like so:
from django.conf.urls.defaults import patterns, url
from django.views import generic
urlpatterns = patterns('',
Debugging Python with pdb or ipdb
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.
my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
for item in my_list:
if item % 2 == 1:
Is scrum a sham?
For most small companies, I think it is.
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 ...
Python for PHP Developers
I worked with Ryan Irelan at Mijingo to release a screencast for PHP developers who want to learn the basics of Python. If you fit in that boat, go check it out.
oAuth & the 37 Signals API
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 ...
Yep, that happened
Tools I use
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 ...