Django : Faking it with South

Posted by & filed under GeoDjango.

So we use the super awesome South to manage schema changes when we change our django models. Basically South works in the background to make sure that your database is always in a consistent state with your models. Recently I have been adding South to a project and deploying these updates to my server. One… Read more »

Django development with Eclipse and PyDev

Posted by & filed under GeoDjango.

Eclipse is a Java IDE right? Wrong! You can use it for other languages too! I have been needing to improve my debugging techniques for python and Django (more on that in the future). This post outlines how you can set up Eclipse with PyDev to work on an existing Django aplication. The benifits? A… Read more »

How to move a django project and its virtual environment

Posted by & filed under GeoDjango.

We do a lot of django work here at Linfiniti and always use a python virtual environment with each project so that the runtime requirements are isolated to that project. Our typical project looks like this:   projectfolder +– django_project    +– django_app +– python    +– bin    +– include    +– lib   … Read more »

Django: serving an image from a remote server

Posted by & filed under GeoDjango.

For a current project (using django), I wanted to get a dynamically generated image from a remote map server and return the image to the django view as an object (as opposed to returning a URL as a string). Here’s how it’s done (logic derived from this code snippet): import urllib import urllib2 import mimetypes… Read more »

Bending django flatpages to your will

Posted by & filed under GeoDjango.

I’ve been working on a web site for a client that uses django flatpages. Flatpages is a built in component that allows users to create static content within the admin interface and publish it to the web front end. Think of it as a basic content management system component for django. Out of the box… Read more »