hi, not to waste time, plz tell me how should i use this code in controller
default.py :
it works in python well but in web2py error..error..error
from urllib2 import Request, urlopen, URLError
url = request.vars.url
req = Request(url)
try:
response = urlopen(req)
except URLErro
in a shorten-er built by web2by i want to validate url's first, if it's not
valid goes back to the first page with an error message. this is my code in
controller (mvc arch.) but i don't get what's wrong..!!
import urllib
def index():
return dict()
def random_maker():
url = request.vars.url
2 matches
Mail list logo