thanks Anthony now i have an operational shell the virtual fields problem is fixed too
Le mercredi 28 octobre 2015 14:10:12 UTC+1, Anthony a écrit : > > > 1. Instead of the web-based shell in admin, use the web2py Python > shell (i.e., python web2py.py -S myapp/mycontroller -M). Note, specifying > the controller is optional -- if you include it, you will have access to > the functions defined in the controller. > 2. You mentioned that you auth.user_id was None in the shell. That is > as expected, as there is no login in the shell (though I suppose you could > call auth.login_user explicitly in the shell to do so). > 3. We need to see your table definitions (including the virtual > fields). > 4. We need to see the traceback. > > > On Wednesday, October 28, 2015 at 6:31:30 AM UTC-4, Pierre wrote: >> >> I installed web2py on 2 ubuntus but I can't use its internal shell on >> both machine. On the desktop after a few commands shell issues an error : >> error please reload the page and then it's not working anymore >> On the laptop shell always answer None whatever the command ? >> it seems to me there are issues with virtual fields too depending on the >> presence or absence of a virtual field the same command either works or >> crashes web2py: >> here is the controller: >> >> def testa(): >> rec = db.without_virtual_field(1) >> return dict(a=rec.id,b=rec.name) >> >> this crashes web2py : >> >> def testa(): >> rec = db.with_virtual_fieldl(1) >> return dict(a=rec.id,b=rec.name) >> >> I use a function (not lambda) placed in db1 to calculate the virtual field >> >> Le mardi 27 octobre 2015 14:43:17 UTC+1, Richard a écrit : >>> >>> Can you show the code you change previous and the actual code? >>> >>> You may have erase something related to the auth... >>> >>> Richard >>> >>> On Tue, Oct 27, 2015 at 8:51 AM, Pierre <theogn...@gmail.com> wrote: >>> >>>> Hi, >>>> >>>> strange......I changed my application adding virtual fields and now it >>>> seems like the authentification system is corrupted >>>> I can login and logout but auth.user_id is unavailable >>>> I login and type in the shell : print auth.user_id it says None >>>> auth.user.id gives an error >>>> >>>> if I go to the welcome application sign-up+login same problem >>>> >>>> >>>> ???? I don't understand >>>> >>>> -- >>>> 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+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- 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.