The first step is to edit dotcloud.yml, and replace our
plain PostgreSQL with PostGIS. Technically, PostGIS is just
PostgreSQL with additional geographic extensions. It provides
new SQL types, functions, and also a bunch of tables that
are used by PostGIS to store projection information (allowing
you to add your custom projections without recompiling or
even editing local files), as well as metadata about your
own geographic tables.

dotcloud.yml:

www:
type: python
db:
type: postgis

If you’re new to PostGIS, we recommend checking out
http://postgis.refractions.net/ to get a primer about
how it works. It’s not strictly necessary to work with
GeoDjango, but it can help – just like knowing SQL is
not mandatory to work with Django, but will make you
a better Django developer.

[...]DATABASES={'default':{'ENGINE':'django.contrib.gis.db.backends.postgis','NAME':'template1','USER':env['DOTCLOUD_DB_SQL_LOGIN'],'PASSWORD':env['DOTCLOUD_DB_SQL_PASSWORD'],'HOST':env['DOTCLOUD_DB_SQL_HOST'],'PORT':int(env['DOTCLOUD_DB_SQL_PORT']),}}[...]INSTALLED_APPS=('django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.sites','django.contrib.messages','django.contrib.staticfiles',# Uncomment the next line to enable the admin:'django.contrib.admin',# Uncomment the next line to enable admin documentation:# 'django.contrib.admindocs','django.contrib.gis',)[...]

We will now write the (possibly) simplest GeoDjango app ever.
It defines a model with a PointField and a name. Think of it
as a way to record famous landmarks. Of course, GeoDjango also has
other types, allowing to use lines, polygons, as well as collections
of those basic types. Available fields and their options are
described in the documentation at
https://docs.djangoproject.com/en/dev/ref/contrib/gis/model-api/.

INSTALLED_APPS=('django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.sites','django.contrib.messages','django.contrib.staticfiles',# Uncomment the next line to enable the admin:'django.contrib.admin',# Uncomment the next line to enable admin documentation:# 'django.contrib.admindocs','django.contrib.gis','hellodjango.places',)

Also, we will allow this app to show up in the Django admin site.
GeoDjango provides a special geographic admin, that displays
geographic fields on a map, and allows you to edit them, just like
you would edit a regular text or numeric field.

At that point, your first GeoDjango app is ready: push it to
DotCloud! At the end of the push, you will see the application
URL. Add “/admin” at the end of the URL, login with “admin”
and “password”, and try to add something in the “Places” table!