Darren O'Neill

Introducing django-datetime-utc

Today I submitted a package to PyPi called django-datetime-utc. You can install it via Pip:

$ pip install django-datetime-utc

This package provides DateTimeUTCField, a naive datetime model field. In PostgreSQL this translates to the field timestamp without time zone. All timestamps are saved in UTC.

I created this because ...

Sending triggered emails with Django using Celery and SES

This post shows how you can send triggered emails asynchronously through Amazon's SES (Simple Email Service) using Django, Celery and RabbitMQ.

First up install and run RabbitMQ:

  • Install: sudo apt-get install rabbitmq-server
  • Run: rabbitmq-server

Next install Celery following the instructions here (make sure you add the following to settings ...

Using PostGIS and GeoDjango to find your nearest neighbour

Firstly create a database table to hold points of interest. You should probably use South / Django's syncdb. SQL shown for reference:

    id integer NOT NULL,
    name character varying(100),
    location geography(Point,4326),
    longitude double precision,
    latitude double precision

CREATE INDEX store_location_idx ON store USING gist ...