Russell, Michael, tonecmd,
Thanks a lot for the replies.
What I've ended up doing is adding a limit_choices_to like this:
candidate = meta.ForeignKey(Candidate, limit_choices_to = {'id__in':
['1', '2']} )
Then I intercept the admin url, get the current user, and in a method
on the cl
If you're using magic removal, this thread outlines a nice solution;
http://groups.google.com/group/django-users/browse_frm/thread/f8dace4668c0c2b1/d9ad4190912c0bd1?q=limit_choices_to&rnum=3#d9ad4190912c0bd1
Cheers,
Tone
--~--~-~--~~~---~--~~
You received this m
Hi,
On Mon, 2006-04-10 at 15:36 +0100, Graham King wrote:
> Is there a way to control the values that appear in a pulldown (a
> ForeignKey field) on the admin interface ?
>
> I would like the ForeignKey to only be assignable to a subset of all
> values.
Is the limit_choices_to option suit
Graham King schrieb:
> Dear django-users,
>
> Is there a way to control the values that appear in a pulldown (a
> ForeignKey field) on the admin interface ?
Yes, that's limit_choices_to. Search for this in the documentation to
models.
Michael
--~--~-~--~~~
4 matches
Mail list logo