def get_url(page, arg_index):
args = request.args or []
if len(args) < (arg_index + 1):
args.append(None)
args[arg_index] = pagina
try:
return URL(args=args, vars=request.vars)
except:
return URL(args=args)
class Pagination(object):
def __init__(self, cpp, total, pagina, arg_index=0):
# ... initializations
def get_url(self, page):
request = current.request
args = request.args or []
while len(args) < (self.arg_index + 1):
args.append(None)
args[self.arg_index] = page
try:
return URL(args=args, vars=request.vars)
except:
return URL(args=args)
def html(self):
result = ''
for e in range(1, self.paginas + 1):
result += '<a href="%s">%s</a>' % (self.get_url(e), e)
return XML(result)
Does the ticket store info about the content of vars and args when the error triggered?I'm sending tickets2email, so I don't conserve the original ticket, but If I could find that info in the ticket, I guess I could disable tickets2email in scheduler and wait for the error to appear again.
Hi there, sorry for the delay, I was waiting for the error to occur.Today the error triggered again, and I had disabled tickets2email, so I have the ticket, but it doesn't show any code, its odd.
'title': u'Eva de Dominici pos\xf3 como una chica Guess y cont\xf3 sus tips beauty'
URL(..., vars=dict(..., title=unicode(title).encode('utf8')))
I see that there is a 'title' key in the list_vars, but those vars are related to urllib.
I mean, how do they arrive as keys to that function? I can't figure it out.In the ticket details, when I click the "code" button related to my view, it shows an empty space:
<a href="{{=URL('default', 'user', args='login', host=CONFIG.dominio_panel, vars={'_next': URL(args=request.args if 'l' in request.args else request.args + ['l'], vars=request.get_vars, host=True) or ''})}}">LOGIN</a>
var full_url = location.protocol + "//" + window.location.hostname + location.pathname;
window.location = "{{=URL('contenido', 'editar', host=CONFIG.dominio_panel)}}" + "/" + contenido + "?_next=" + full_url;
This is a login button, present in the layout, so it's in every page:
<a href="{{=URL('default', 'user', args='login', host=CONFIG.dominio_panel, vars={'_next': URL(args=request.args if 'l' in request.args else request.args + ['l'], vars=request.get_vars, host=True) or ''})}}">LOGIN</a>The url of the login button uses the vars argument to pass the "_next" key. The _next key contains the current url (with current request.args and request.get_vars).
May I ask how did you figure out? I mean, did you already know about that jquery stuff, or did you made some search with the parameter's names?
P/D: I looked in the web2py's website and I didn't found any way to donate. I've seen an old post saying that it was better to donate to them who needed it most, the post gives a link to donate to another cause. But we (our company) would really like to contribute, not only to web2py, but also to you (that small group of people who is always here helping).