Admin fields for contained members

2006-12-06 Thread JMCameron
>From tutorial, part 2, the following type of code class Poll(models.Model): ... class Admin: fields = ( ) is used to control how the admin interface displays the Poll objects (controlling which items appear on separate lines, etc). How can I control how the contained obje

Problem with custom forms and related objects

2006-12-29 Thread JMCameron
I'm having a problem with custom forms and models with related objects. I've created a simplified test case that illustrates the problem. Here is the model file (a room contains several chairs): -- model.py - class Room(models.Model): name = models.CharField(ma

Re: Problem with custom forms and related objects

2006-12-30 Thread JMCameron
Thanks ElGranAzul, my django code is up to date (via svn), so 'oldforms' is equivalent to 'forms' (the __init__.py files are the same). So using 'from django import oldforms as forms' may be better form (no pun intended!), but will not fix the problem I'm trying to figure out. Both RoomForm a

Re: Problem with custom forms and related objects

2007-01-02 Thread JMCameron
Thanks Justin! I just figured this out myself. I'll include the updated RoomForm definition below since I've cleaned it up a bit and made a small fix to the save function: -- from django.db.models.related import RelatedObjec