The Practice of Programming Programmers are, in essence, problem solvers. They live to solve problems. When they identify a problem that needs solving, they cannot resist the temptation to study it, poke and prod it, and get to know it intimately. They then start considering solutions. At this point, the programmer is not often thinking…
Category: Python
Cool Mac/Mobile Software for Sysadmins, Programmers, and People
I recently upgraded my primary workhorse (a MacBook Pro) to Snow Leopard. Before I did, I decided to go through and take stock of all of the documents and software I’d accumulated. While I was doing this, I simultaneously got into a conversation with a buddy of mine about the software he uses on his…
Representing Relationships in Django Templates Without Writing Extra Code (RelatedManager and ManyRelatedManager)
I’m writing an application that deals with some slightly complex relationships. There are several offices, and each office has several workers. Workers can have multiple projects, and each project can have multiple workers. In addition, each project can serve multiple clients. Here’s what that’d look like in a Django models.py file: While writing the template…
Lessons Learned While Creating a Generic Taxonomy App for Django
So, when I first picked up a guitar, the first song I sat down to learn, by ear, was Stairway to Heaven, not “Twinkle, Twinkle, Little Star”. So goes my experience with Django 🙂 The Background I was humming along on my recreation of LinuxLaboratory.org. I got a simple blog in place in just a…
Using a robots.txt File With Django and Apache (on Webfaction)
I’ve developed in a few different environments, including multi-tier ones with middle tier Java app servers and stuff, but it always seemed pretty straightforward to serve something directly from disk. And in the case of PHP, everything is served from disk. There’s no middleware to speak of, so you can throw a robots.txt file in…
Django Settings in Dev and Production: Why the hoops?
So, I’ve taken a break from active development on my project to take a step back and really get a good development workflow together. I’ve been fighting with various components of my development workflow, and in the end decided to compromise: I won’t have something that looks exactly like production, but I’ll have something that…
Django App Design: Extend or Build From Scratch?
Django has proven itself (to me, anyway) as a great tool for the job of creating very robust web applications with lightning speed. In just a week or two, I’ve created a site that encompasses a blog with an akismet-powered comment moderation system, a code sharing section complete with highlighted code segments (and line numbers),…
Create a Tagging Index Page with django-tagging
For those not following along, I’ve been recreating LinuxLaboratory.org using Django. It’s my first Django project that you could call “real work”. I’ve been using the Django documentation, various blogs, and the 2nd edition of “Practical Django Projects”, which has given me a lot of ideas, and a lot of actual code. Some of it…
How To Get Firefox to Recognize Your Site’s RSS Feed
I just implemented an RSS feed in one of my sites the other day, and realized that visiting my site in Firefox did *not* result in the little blue feed icon showing up in the address bar area. Turns out it’s not so automagic. You need to do stuff to make it happen. To get…
My Django Project Update: RSS Feed, “Home” Link, and more.
In continuing the rebuild of LinuxLaboratory.org using Django, I’m happy to say that things have moved fairly smoothly. I’m using a good mix at this point of stuff from the 2nd edition of “Practical Django Projects”, the Django documentation, blog posts, and docs from other apps I’m making use of. RSS I said in one…