getting u'string' at the beginning of each item in a list
def search_mov(movie_name):
try:
from django.db import connection, transaction
cursor = connection.cursor()
cursor.execute("select query from Winteract_Wogmainteract
where query like %s",['%'+movie_name+'%'])
row = cursor.fetchall()
print row
return row
its the function from models.py..
the problem is its returning the correct result,but its appending u
character to the beginning of each item in the result list..it is
printing the list as follows::
((u'Bow Barracks Forever',), (u'Shrek Forever After',))
((u'Shrek Forever After',),)
m passing movie_name as shrek forever after
I dont want the u character to the beginning of each item..I already
tried str() method but its not working...so plz help me in this...
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home