Hello u'r looking for "extra" Query method. https://docs.djangoproject.com/en/dev/ref/models/querysets/#extra
An other option more sofisticated but still work in progress, is use the postgres manager in the project django-orm-extension in order to use the expressions functions. http://django-orm.readthedocs.org/en/latest/orm-expressions.html On Monday, September 3, 2012 7:15:11 AM UTC-5, zayatzz wrote: > > Hello > > About a year ago i found this : > > https://github.com/aino/django-arrayfields > > and developed upon it (https://github.com/zay2/django-arrayfields) and > integrated it into my project. Now i know that in postgresql i can do > something like this: > > SELECT * FROM sal_emp WHERE 10000 = ANY (pay_by_quarter); > > where pay_by_quarter is arrayfield, to select rows by value in arrayfield. > But since django does not offer postgresql arrayfields support im quite > sure it does not support filtering based on arrayfield contents. > > But still i would like to be able to do just that in my project - so what > should i extend now? Queryset filter method or rather query_utils.Q class? > Or should i even bother since this arrayfield can be looked up as string > and its contents can be searched like > queryset.filter(fieldname_icontains='something') or should i rather use raw > query there? > > what do you think? > > Alan > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/zeVdxyD3xwcJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.