Hey Seemant,

Sorry about not getting back to you sooner to work on this. Been
finishing off last minute details with my SoC project.

Here is what I've come up w/ that (w/ my limited testing) seems to
work:

    preacher = models.ForeignKey (
            Person,
            limit_choices_to = { 'role__pk':
Role.objects.get(name='Pastor').id}
        )

Might want to put that into a method that has a try and except for the
DoesNotExist exception to handle it. Otherwise, it looks like django
may not show the page if the exception is caused.

Hope that helps.

Chris (aka clong)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to