Hi,
see ticket
http://code.djangoproject.com/ticket/3257
it conatins a ModelChoiceField, that does a bit more - it also returns
a valid object, not just the ID
the ticket has been accepted I am only waiting for decision on whether
to prepend an empty choice ("", "------") or any suggestion on other
ways of doing that...
Honza
On 1/31/07, Rubic <[EMAIL PROTECTED]> wrote:
>
> +1
>
> Aside from putting choices in __init__, my other current workaround is
> to use Python's property feature:
>
> class PhysicianChoices:
> def _physicians(self):
> return [(e.id, e.name) for e in \
> Physician.objects.order_by('lastName','firstName') if
> e.active]
> choices = property(_physicians)
>
> --
> Jeff Bauer
> Rubicon, Inc.
>
>
> >
>
--
Honza Kr�l
E-Mail: [EMAIL PROTECTED]
ICQ#: 107471613
Phone: +420 606 678585
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---