HI Leepy,
     Even am also got stuck with the same issue. Did you find any
solution? I want to search content inside TEXTFEILD without any
condition like (comma, line break, space)Can anyone here to help me
out to solve this issue.

Thanks & Regards,
Jai Python

On Nov 23, 4:15 pm, leppy <jlax...@gmail.com> wrote:
> Hi all,
>
> I have a TextFeild() in my application for storing addresses. It
> contains address as comma separated, or space separated, or with
> linefeed characters. When I try to search the field using 'icontains'
> by giving address as comma separated value, I am getting a null query
> set.
>
> I am getting address from requested url as 'testing, testing 1,
> testing 2.'
>
> i.e.,
>
> >>> ModelName.objects.filter(address__icontains=  'testing, testing 1, 
> >>> testing 2.')
> >>> []
>
> Getting [] since the address is being stored in the model  as
> u'testing,\r\ntesting 1,\r\ntesting 2.'
>
> How can I search address by omitting some special characters such as
> '\r\n', ',' etc. since I'm not sure how end users will add data via
> django admin page.
>
> Thanks in advance,
> Leppy.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.


Reply via email to