Django and Relativity Updated

  • May 5th, 2009 (1 month, 4 weeks ago)

Currently it's the season of EuroDjangoCon and I'm reading various presentations. One interesting thing I'm seeing is that many people are using relative paths in their settings.py file but in different ways. (For reference, see Django and Relativity). So far I've seen:

  1. os.path.dirname(__file__)
  2. os.path.abspath(os.path.dirname(__file__))
  3. os.path.realpath(os.path.dirname(__file__))

I've reviewed the 3 ways provided here and looked at the Python source for verification. Let's talk about each one briefly...

1) dirname

PROJECT_ROOT = os.path.dirname(__file__)

While the above might work ...

Previously...

Testing Emails with Django

  • November 20th, 2008 (7 months, 1 week ago)

The 56, 5 Book Meme

  • November 12th, 2008 (7 months, 3 weeks ago)

A Django Management Command for Amazon S3

  • October 29th, 2008 (8 months ago)

Link2009 Jun 20

MPOAuthConnection

MPOAuthConnection is a drop in cocoa component for Mac and iPhone apps to talk to OAuth web services

Link2009 May 20

The Git Parable

A fictional tale of a programmer's quest to make a version control system, except what it describes in step by step detail is how Git works. Nicely done and informative.

Link2009 May 19

The Little Manual of API Design

Insights into API design from Trolltech, makers of the QT libraries. Adding this to my to-read list. (PDF)

Link2009 May 13

django-tinymce - Google Code

A django forms widget with support for languages, spell checking, and file browsing. Nice!

Link2009 May 08

Yolk

Yolk is a command-line tool querying PyPI and Python packages installed on your system.

Link2009 May 07

korpios's bulbs at master - GitHub

A collection of interesting code, mostly Django related, used by The Onion.

Link2009 May 05

How To Create A Data Entry Screen | iPhone Development Blog

I'm thinking I will need this in the not so distant future.

Link2009 Apr 30

How Long Will the World’s Natural Resources Last? | FlowingData

Neat chart estimating natural resource consumption. More interesting visualization data.

Link2009 Apr 21

An interactive map of vanishing employment across the country. - By Chris Wilson - Slate Magazine

I always like these timeline-on-a-map style of viewing how data changes over time. This one is a bit scary.

Link2009 Apr 16

The Elements of Computing Systems / Nisan & Schocken / www.idc.ac.il/tecs

A course with most materials needed online. There's an accompanying video. Takes students from a NAND gate to adders to machine language to virtual machines to high level languages. All in one course.

Link2009 Apr 14

favikon

An online favicon generator.

Link2009 Mar 19

json-framework

This framework implements a strict JSON parser and generator in Objective-C. Bookmarking this in case I ever need to interact with a web service.

Link2009 Mar 18

Add Full-Text Search to your Django project with Whoosh

A nice overview of adding the new Whoosh full-text search engine to a Django project using signals to trigger a re-indexing.

Link2009 Mar 12

VPS Showdown

The author compares 2 top Virtual Private Server (VPS) hosting providers, Slicehost and Linode.

Link2009 Feb 28

jQuery Sparklines

This jQuery plugin generates sparklines (small inline charts) directly in the browser using data supplied either inline in the HTML, or via javascript.

Link2009 Feb 26

Git for the real world

"Now that we've been using git at Twitter for a couple of months, we've overcome several crippling problems and misunderstandings about how to use it properly. There are dozens of "intros" and "tutorials" to git online, but at some point you need to know more than just the basics of DVCS and the map to svn commands -- you need to know practical considerations of real-world usage. None of the intros or tutorials had this stuff, so I thought I'd share what we learned."