Sorry, I made a slight mistake above.  I was just trying different
things.  When using the code I posted above, the view is not displayed
and I get an error saying:

'Contact' object has no attribute 'name'

But, when I use this code,

def away_edit(request, away_id):
    aw = get_object_or_404(away, id=away_id)
    aw_form = forms.form_for_instance(aw)
    aw_form.base_fields['contact']=forms.ChoiceField(choices=[(obj.id,
obj) for obj in  Contact.objects.filter(is_staff=True)])

The form displays correctly and it actually does filter out the
choices as I want.  But, when I submit the form I get an error telling
me that "away_away.contact may not be NULL".   I am a lost.  Thanks
for any help you can give.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to