#10749: ImageField is a string in the lookup api ------------------------------------------+--------------------------------- Reporter: [email protected] | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.0 Keywords: ImageField | Stage: Unreviewed Has_patch: 0 | ------------------------------------------+--------------------------------- I was trying to retrieve objects which didn't have the image attribute (an ImageField) set yet, so i tried with {{{MyModel.objects.filter(image=None)}}}. It didn't match any entry... {{{image__isnull}}} didn't work as well. Then i found out that I had to do {{{MyModel.objects.filter(image="")}}}. So basically it seems that the ImageField is exposed as a string, as far as the lookup api is concerned. (I'm not familiar with django enough to look into django's source code to confirm this). It doesn't seem like a consistent behaviour to me, since the imagefields are high-level objects when accessed from instances.
-- Ticket URL: <http://code.djangoproject.com/ticket/10749> 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 -~----------~----~----~----~------~----~------~--~---
