Re: Problems selecting correct object in view

2008-02-16 Thread Nils L
Hi Tim, Contest.objects.filter(pk=pSerial) yields a list (in this case of length 1), not a Contest object. If you want to fetch a single object based on it's primary key you can use: Contest.objects.get(pk=pSerial) See http://www.djangoproject.com/documentation/tutorial01/ - Nils --~--~-~

newforms-admin migration utility script

2008-02-16 Thread Nils L
Hi everyone, I have written a utility script that scans a models.py file and automatically outputs the corresponding newforms-admin source code (the code that goes into the admin.py file). The purpose is to simplify the migration to newforms-admin. Here is what it outputs: * an import line that i