Can Only Concatenate Tuple (not "unicode") To Tuple
I am using Django 1.5.4 I am a newbie in Django and i tried to display the image uploaded via admin panel, but unfortunately the url field in the source code for the image is Empty
Solution 1:
MEDIA_ROOT
should be string not tuple:
MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '..', 'media').replace('\\','/')
Trailing comma makes it a tuple:
>>> x = (1,)
>>> type(x)
<type 'tuple'>
>>> x + u'foo'
Traceback (most recent call last):
x + u'foo'
TypeError: can only concatenate tuple (not "unicode") to tuple
Post a Comment for "Can Only Concatenate Tuple (not "unicode") To Tuple"