I tried __ne and (somewhat naively) __exclude and neither works.
The Wiki documentation at
http://code.djangoproject.com/wiki/RemovingTheMagic#Changedtemplatenamesingenericviews
says that 'ne is no longer a valid lookup type'
I had a look around and in the MR version of the file
db/backends/mysql/base.py we have this;
OPERATOR_MAPPING = {
'exact': '= %s',
'iexact': 'LIKE %s',
'contains': 'LIKE BINARY %s',
'icontains': 'LIKE %s',
'gt': '> %s',
'gte': '>= %s',
'lt': '< %s',
'lte': '<= %s',
'startswith': 'LIKE BINARY %s',
'endswith': 'LIKE BINARY %s',
'istartswith': 'LIKE %s',
'iendswith': 'LIKE %s',
}
Whereas in the 0.91 release (at the location core/db/backends/mysql.py)
we have this;
OPERATOR_MAPPING = {
'exact': '= %s',
'iexact': 'LIKE %s',
'contains': 'LIKE BINARY %s',
'icontains': 'LIKE %s',
'ne': '!= %s',
'gt': '> %s',
'gte': '>= %s',
'lt': '< %s',
'lte': '<= %s',
'startswith': 'LIKE BINARY %s',
'endswith': 'LIKE BINARY %s',
'istartswith': 'LIKE %s',
'iendswith': 'LIKE %s',
}
I guess you could add the line into your own MR installation, but there
might be some side-effects (I did it as a test and got repeated entries
- I've since edited it out)
Anyone know the proper way of doing this?
Cheers,
Tone
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users
-~----------~----~----~----~------~----~------~--~---