12 Blog Entries tagged: django


Using Gmail's SMTP server from Django

  • August 31st, 2008 (1 week ago)

Ever since changeset 5144 Django has had the ability to send email directly through Gmail with a few extra settings in your settings.py file. I recently set up a server using Ubuntu and had no intention of receiving email on it, but I did, however, want my website to be able to send email, so this is a great solution for that case.

Gmail

Consider creating a new email account from which the email will be sent. I like to do this for a few reasons:

  1. For security reasons I don't want to list my password of my ...

Read the rest »

About this entry

Date Posted:
August 31st 2008 at 11:08:28 PM

Tagged:
django, gmail


Django and Relativity

  • June 20th, 2008 (2 months, 2 weeks ago)

My default Django settings file has changed over time to now include settings that do not depend on the location of the project on the filesystem. This is great in a team environment where more than one person is working on the same project, or when deploying your project to a web server that likely has different paths to the project root directory.

There are essentially 2 places that are looking for a filesystem path:

  1. Templates
  2. Media

Let's assume the following directory structure for a Django project:

.
|-- media
|-- myproject
    |-- __init__.py
    |-- manage.py
    |-- settings.py
    |-- templates
    |   |-- base.html
    |-- urls ...

Read the rest »

About this entry

Date Posted:
June 20th 2008 at 3:06:01 PM

Tagged:
django


One of our Django sites finally went public

  • March 21st, 2008 (5 months, 2 weeks ago)

Brain Injury Partners: Navigating the School System

I'm excited to finally be able to announce a Django project we've worked on at ORCAS that was recently released to the general public.

The website's official title is Brain Injury Partners: Navigating the School System and is designed to give parents of school-aged children with a brain injury the skills they need to become successful advocates. It was funded by the National Institute of Child Health and Human Development and made in collaboration with the Brain Injury Association of America.

This was our very first dip into Django that we started in August 2006. Since then ...

Read the rest »

About this entry

Date Posted:
March 21st 2008 at 10:03:00 AM

Tagged:
django, orcas, web


Django Book Gems: assert False

  • December 20th, 2007 (8 months, 3 weeks ago)

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 ...

Read the rest »

About this entry

Date Posted:
December 20th 2007 at 11:12:00 AM

Tagged:
book gems, django


Django Week in Review, Dec 10 - Dec 16, 2007

  • December 17th, 2007 (8 months, 3 weeks ago)

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 ...

Read the rest »

About this entry

Date Posted:
December 17th 2007 at 8:12:00 AM

Tagged:
django, weekly update


Django Week in Review, Dec 3 - Dec 9, 2007

  • December 10th, 2007 (9 months ago)

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

Read the rest »

About this entry

Date Posted:
December 10th 2007 at 11:12:00 AM

Tagged:
django, weekly update


Installing Django on Leopard (Mac OS 10.5)

  • November 14th, 2007 (9 months, 4 weeks ago)

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 ...

Read the rest »

About this entry

Date Posted:
November 14th 2007 at 3:11:00 PM

Tagged:
django, mac os x


Django Development Using git

  • September 17th, 2007 (11 months, 3 weeks ago)

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 ...

Read the rest »

About this entry

Date Posted:
September 17th 2007 at 12:09:00 PM

Tagged:
django


3 tips for web designers using Django

  • August 30th, 2007 (1 year ago)

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 ...

Read the rest »

About this entry

Date Posted:
August 30th 2007 at 11:08:00 AM

Tagged:
django, web


Django Master Class at OSCON 2007

  • July 24th, 2007 (1 year, 1 month ago)

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 ...

Read the rest »

About this entry

Date Posted:
July 24th 2007 at 12:07:00 AM

Tagged:
django, oscon


Django Templates and YUI Grids

  • July 10th, 2007 (1 year, 2 months ago)

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 ...

Read the rest »

About this entry

Date Posted:
July 10th 2007 at 4:07:00 PM

Tagged:
django, web, yui


First Django Post

  • June 9th, 2006 (2 years, 3 months ago)

Hello, this is my first Django powered blog post.

I've attempted to create a blog a few times, switched to blogger, and now am creating a blog again. Mostly for the reason of learning Django. Plus, I like having things on my own server so when I forget exact URLs or passwords I can easily look them up. Anyway, welcome to my new Django powered weblog.

The body of these blogs are using Markdown, so I have to learn how to "mark up" my text with links, images, emphasis, etc. Of course that will be easy enough.

All of ...

Read the rest »

About this entry

Date Posted:
June 9th 2006 at 4:06:25 PM

Tagged:
django