9 Blog Entries for 2007
Reducing HTTP requests using make
After reading the article, High Performance Web Sites: Rule 1 - Make Fewer HTTP Requests, I experimented with concatenating 10 Javascript files into 1 to see what performance gain that would provide.
At work we're using YUI which separates their .js files into modularized chunks so you use what you need. I took a cue from mootool's download page and from the above article and thought that I could save some page load time and HTTP requests by concatenating the .js files into one big "all.js" file in the same order that I was already loading them in ...
Django Templates and YUI Grids
Recently I was playing around with YUI grids to make a 2 column layout. The grid builder is awesome to quickly set up a site skeleton. I was wanting a site that had a full width layout for some pages and a side column for some other pages that had extra meta data about the main content area. I saw that YUI grids was able to do this by simply changing a class name on the major DIV element.
So what I did was set the default wide width in my base template like so:
<div id="doc2" class="yui-t ...
Django Master Class at OSCON 2007
The Django Master Class was a great presentation by Jacob Kaplan-Moss, Simon Willison, and Jeremy Dunck. The link to the slides and notes provided pretty much have everything in full detail, which is awesome, but there's the summary...
The format was Jacob, Simon, and Jeremy each presenting 3 of their favorite topics in Django. This format worked out very nicely, I thought, as it broke up the talk into 9 20-minute chunks.
Simon presented unit testing, forms and AJAX, and OpenID.
Jacob presented "Stupid middleware tricks", template tag patterns, and the "rest" of the stack.
Jeremy presented signals, custom ...
3 tips for web designers using Django
In working with a good friend and web designer recently I came up with a few tips for web designers when working with Django -- things that might not be immediately apparent when reading the docs.
Keep it simple, read the documentation
There are often times when you have a goal for the user interface and you tend to over engineer how you go about implementing it. For the most part, Django makes things very straight forward. You'd be amazed at how many things can be accomplished with generic views and the template tags/filters. So if you've hit ...
Django Development Using git
A little background
Not very long ago I was fortunate to attend a talk given by Randall Schwartz on git, the distributed source control system developed by Linus Torvalds and the rest of the Linux kernel developers. After that talk and after watching the Google Video talk given by Linus I decided to dip my toe into the waters by installing git on my Mac and writing a few patches for Django.
Installation on a Mac using MacPorts
With MacPorts installed, installing a recent version of the svn variant of git is simple enough:
> sudo port install git-core +svn
Test ...
Installing Django on Leopard (Mac OS 10.5)
I wrote these step-by-step instructions for my work for our new Mac desktop machines. I'm posting here as well in the case that they're useful...
MacPorts
Get MacPorts with the version 10.5 in it:
http://svn.macosforge.org/repository/macports/downloads/MacPorts-1.5.0/MacPorts-1.5.0-10.5.dmg
Install it, and follow this command line history...
First check if Macports has any updates...
$ sudo port selfupdate
Python
Install Python 2.4 with readline support. I chose Python 2.4 because it's the default in MacPorts when installed other libraries...
$ sudo port install readline
$ sudo port ...
Django Week in Review, Dec 3 - Dec 9, 2007
This post is a test of a new Django Week in Review format. I'm testing an automated script to parse the Django timeline with some minor edits and additions.
Over the following week I'll monitor a few Django resources and include links to more relevant items. If you have something you'd like included for next week I'm monitoring the Django tag on delicious and Django group on Magnolia, or email me directly.
django-developers list hightlights
Django Week in Review, Dec 10 - Dec 16, 2007
The obvious big news this week is that the Django Book is selling and the full text was announced available for viewing at djangobook.com.
Mailing List Highlights
Performance of a Django website: An interesting discussion on how to profile a Django website with some background information on Apache processes with mod_python.
Models over SQL views - disable regeneration of model: A discussion on disabling SQL generation when running syncdb.
Is 'LIMIT 0' a valid query?: And whether COUNT(*) or COUNT(1) is optimal for various databases.
Putting django on Amazon DB: An idea to write a Django ORM backend to ...
Django Book Gems: assert False
Now that it's been officially released I've started re-reading the Django book, The Definitive Guide to Django: Web Development Done Right. I'm going to start a small series on nice little snippets on bits of great information from the book as I re-read it.
One I found today while reading Chapter 3 was this:
Are you the type of programmer who likes to debug with the help of carefully placed print statements? You can use the Django error page to do so—just without the print statements. At any point in your view, temporarily insert an
assert ...