karen,

thnx. what if i want to limit the field by two different fields? i
want to limit it to active = 1 and type = 1

On Mar 28, 1:49 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 28, 2008 at 1:40 PM, ameriblog <[EMAIL PROTECTED]> wrote:
>
> > i have the following classes:
>
> > NEWS
> > headline
> > story
> > main-image (fk)
> > story-image (fk)
>
> > IMAGE
> > image
> > title
> > description
> > type
>
> > What I'd like to do is in the admin, when I go to add a news item that
> > in the main-image field it only gets entries from IMAGE where type =
> > 1, and story-image where type = 2
>
> > Can I do this?
>
> Sounds like you want limit_choices_to, described here (under the description
> of extra arguments):
>
> http://www.djangoproject.com/documentation/model-api/#many-to-one-rel...
>
> Karen- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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