You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from shortener.models import url
url = u'http://t04u.be/'
type(url)
<type 'unicode'>
b = url(longurl=url)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'unicode' object is not callable
from django.utils.encoding import smart_str
b = url(longurl=smart_str(url))
Traceback (most recent call last):
File "", line 1, in
TypeError: 'unicode' object is not callable
smart_str(url)
'http://t04u.be/'
type(smart_str(url))
<type 'str'>
a = smart_str(url)
type(a)
<type 'str'>
b = url(longurl=a)
Traceback (most recent call last):
File "", line 1, in
TypeError: 'unicode' object is not callable
The text was updated successfully, but these errors were encountered:
Environment:
Request Method: GET
Request URL: http://192.168.11.4:8001/url/http://forecast.weather.gov/MapClick.php?CityName=Philadelphia&state=PA&site=PHI&lat=39.9525&lon=-75.1657/
Django Version: 1.3 SVN-16009
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'shortener']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/home/mugen/programming/django/django/core/handlers/base.py" in get_response
Exception Type: TypeError at /url/http://forecast.weather.gov/MapClick.php?CityName=Philadelphia&state=PA&site=PHI&lat=39.9525&lon=-75.1657/
Exception Value: 'unicode' object is not callable
The text was updated successfully, but these errors were encountered: