#13383: Querysets should only allow the correct model types to be filtered
against
------------------------------------------+---------------------------------
Reporter: SmileyChris | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
Here's a simple example of what is allowed at the moment. It seems that
this should throw an exception for the last line:
{{{
In [1]: from django.contrib.auth.models import *
In [3]: u = User.objects.all()[0]
In [5]: m = Message.objects.create(user=u, message='test')
In [6]: m.pk, u.pk
Out[6]: (1, 1)
In [10]: User.objects.filter(message=m)
Out[10]: [<User: chris_b>]
In [11]: User.objects.filter(message=u)
Out[11]: [<User: chris_b>]
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/13383>
Django <http://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.