Re: Handling legacy single-row tables

2007-10-25 Thread younours
On Oct 25, 12:32 am, "Bill Fenner" <[EMAIL PROTECTED]> wrote: > I've got a legacy application with a few tables that only have a > single row, e.g., for configuration information. I can easily get the > info with the following hack: pick a column to be a pretend primary > key (so that django does

Handling legacy single-row tables

2007-10-24 Thread Bill Fenner
I've got a legacy application with a few tables that only have a single row, e.g., for configuration information. I can easily get the info with the following hack: pick a column to be a pretend primary key (so that django doesn't add the id field), and use Model.objects.get(foo__isnull=False) -