views:

38

answers:

0

I have just recently started using django (and i'm a novice python user as well), so please have some patience with my ignorance.

I have installed a django application on my webhost, and I intend to use its admin interface as a multi-user log system (for lab work). There are different 'project's where each 'project' has a number of 'person's associated via a models.ManyToManyField. Further there is a table called 'Sample' and each 'sample' belongs to a 'project'. Now to the question:

When I click to view the Sample change list, I would like to automatically filter this, so the person logged in only sees the Samples, belonging to a project which has the logged in person registered as a user in that project. So there are essentially two parts to my question:

  • How can I filter the change list automatically as soon as it is loaded?
  • How can I relate the auth tables in the database to my application database in order to connect a 'Person' to someone registered as a user in the auth tables?

I hope the question is clear enough.