Actually, there's a bigger problem. In Python, default arguments are evaluated when the function is first defined, so all of your default arguments will be set when the module is first imported. Therefore, all references to the "current" object in the default arguments will be fixed to the values of the first request (when the module is first imported). Those values will not change on subsequent requests. Instead, all of those arguments should be set to some other default (such as None), and then re-set using "current" within the function body, as Niphlod suggests.
Anthony On Thursday, September 3, 2015 at 10:46:49 AM UTC-4, Niphlod wrote: > > > > On Thursday, September 3, 2015 at 7:22:52 AM UTC+2, Carlos Cesar Caballero > wrote: >> >> Hi Niphlod, many thanks for your suggestions, The main problem with >> web2pyslices.com is that I can't publish anything and I don't know why, >> I mentioned this in other threads. >> About the default value in argument, I can change it, but why you prefer >> default to None? >> > > It'll be easier to read. > For web2pyslices.com let's wait for @spametki to chime in... > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.