#16714: Can't list_filter across a relationship on a SmallIntegerField
------------------------------------+---------------------------------
Reporter: Clueless | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: contrib.admin
Version: 1.3 | Severity: Release blocker
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------+---------------------------------
Comment (by julien):
Interesting, indeed. I might be missing something fundamental but I'm
puzzled as to why TypeErrors are raised in the following:
{{{#!python
>>> Rel.objects.filter(year=u'2010')
[<Rel: Rel object>]
>>> Rel.objects.filter(year=2010)
[<Rel: Rel object>]
>>> Rel.objects.filter(year__exact=2010)
[<Rel: Rel object>]
>>> Src.objects.filter(rel__year__exact=2010)
[<Src: Src object>]
>>> Src.objects.filter(rel__year__exact=u'2010')
[<Src: Src object>]
>>> Src.objects.filter(rel__year=2010)
...
TypeError: Related Field has invalid lookup: year
>>> Src.objects.filter(rel__year=u'2010')
...
TypeError: Related Field has invalid lookup: year
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/16714#comment:3>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.