Hello, http://pastie.org/private/xvqf5tgjnimiolakhawgg (relevant code)
Django's QuerySets allow you to do ORs (unions) pretty nicely with Model.manager.filter(Q(...) | Q(...)). However, ANDs don't work quite as nicely in my situation because I want AND to do what Model.manager.filter(Q(...)).filter(Q(...)) would do, but Model.manager.filter(Q(...) & Q(...)) does something very different. It does not compare fields with other rows in the table but rather with the same row against itself. For example, I have a Tag model with a CharField I call 'name'. If I were to do Tag.objects.filter(Q(name='text') & Q(name='password')), it would compare each tag to check if the tag's name equals "text" AND that the same tag's name equals "password". Can you think of a way to fix eval_cmds() so that my app can parse a query like "(text & password) | (python & django)" which a user would enter? It seems like nothing I try will work. Thank you, Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---