Thanks Alex. A simpler way out would be if the agent field, which is a foreign key pick list, could be caused to show only those values I determine dynamically.
Is this possible in a ModelForm? Mke On Jul 12, 12:17 am, Alex Gaynor <[email protected]> wrote: > On Sat, Jul 11, 2009 at 10:08 AM, adelaide_mike <[email protected] > > > > > wrote: > > > Django 1.0.2. My ModelForm concerns (and is based on the table for) > > advertisements for houses placed by real estate agents. > > > I need the agent widget (which by default is a pick list of all > > agents), to be modified on the form to be either (depending on > > circumstances) a non-editable preset display object, or a pick list > > with a dynamically set choice of two agents. > > > So, I need to add extra fields to my ModelForm. Can this be done? > > > Thanks > > > Mike > > Sure, just define a Field on the ModelForm in the same way you would on a > regular Form and it will get added to the Form. > > Alex > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." -- Voltaire > "The people's good is the highest law." -- Cicero > "Code can always be simpler than you think, but never as simple as you want" > -- Me --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

