#23351: Admin Search Field error for related lookup
----------------------------------------------+----------------------
Reporter: ebertti | Owner: nobody
Type: Uncategorized | Status: new
Component: Database layer (models, ORM) | Version: 1.7-rc-2
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+----------------------
I'm using Django Version 1.7c2 and I have these two models :
{{{
class Module(models.Model):
name = models.CharField(max_length=255)
class Subject(models.Model):
module = models.ForeignKey(Module)
}}}
And this Admin Class:
{{{
class SubjectAdmin(admin.ModelAdmin):
search_fields = ('module__name',)
}}}
And i'm getting this error
FieldError at /admin/app/subject/
Relation fields do not support nested lookups
on django\db\models\fields\related.py in get_lookup_constraint
raise exceptions.FieldError('Relation fields do not support nested
lookups')
--
Ticket URL: <https://code.djangoproject.com/ticket/23351>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.94f7c92d68c7c4d4ef12b672219bfd44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.