Hi,

You may be interested in this:
http://stackoverflow.com/questions/2618893/how-to-filter-queryset-in-changelist-view-in-django-admin,
looks like a similar (solved) problem.
In short, it's about overriding the queryset() method of ModelAdmin.

On Thu, Sep 23, 2010 at 11:33 AM, ionut cristian cucu
<cucife...@gmail.com>wrote:

> Hi list,
> I just came to django, and to web programming for that matter, so my
> question is from a n0b:
> I have to models:
> class Pacient(models.Model):
>     name=models.CharField('name', max_length=123)
> <snip>
> class Exit(models.Model):
>      pacient=models.ForeignKey(Pacient)
> <snip>
>
> How to I get the admin interface to show only the pacients for whom I
> have no exit objects.
> Rephrase: if I have an Exit object for a Pacient, I don't want that
> Pacient object to show up
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to