hmmm, what about defining a custom search_method? is that possible?
maybe with using a Custom Manager?



On 19 Mrz., 19:59, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Thu, Mar 19, 2009 at 12:37 PM, patrickk <sehmasch...@gmail.com> wrote:
>
> > is there any way to search for a "content_object" within the change-
> > list?
>
> > my model:
>
> > class Trailer(models.Model):
> >    ...
> >    content_type = models.ForeignKey(ContentType)
> >    object_id = models.PositiveIntegerField()
> >    content_object = generic.GenericForeignKey()
> >    ...
>
> > now, I´d like to do something like:
>
> > class TrailerOptions(admin.ModelAdmin):
> >    ...
> >    search_fields = ('content_object',)
> >    ...
>
> > this obviously doesn´t work ... are there any workarounds?
>
> > thanks,
> > patrick
>
> Not really, but that's because there's no way to preform that query at the
> database level.
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
--~--~---------~--~----~------------~-------~--~----~
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 
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