Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jim Steil
That is your default.py, correct? Which function are you trying to protect with authorization? I'm guessing it's the index or show. First off, I'd get rid of the user and download functions you added. They are already in place as they should be (the ones at the bottom are what you want). If I'

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jon Paris
Again pretty much the scaffold code plus the tutorial changes I think. # -*- coding: utf-8 -*- # - # This is a sample controller # this file is released under public domain and you can use without limitations # -

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jim Steil
Jon What does your controller look like? -Jim On Wed, Apr 22, 2020 at 5:13 PM Jon Paris wrote: > Yes - I can see that now - but that was in the original scaffolding. > > I moved stuff around and now have this at the start: > > from gluon.contrib.appconfig import AppConfig > from gluon.tools imp

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jon Paris
P.S. Just using the one I was pointed to Jim - if you know of a better one I'd be happy to hear it. The biggest problem appears to be that it was written long before a lot of the "stuff" was added to the scaffold files. In some cases the tutorial tells you to replace the whole file - but in ot

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jon Paris
Yes - I can see that now - but that was in the original scaffolding. I moved stuff around and now have this at the start: from gluon.contrib.appconfig import AppConfig from gluon.tools import Auth db = DAL("sqlite://storage.sqlite") auth = Auth(db) auth.define_tables(username=True) The removed

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jim Steil
Jon You're redefining db right above your define_table for 'image'. db is already assigned/defined higher up in the db.py file. We don't want to redefine it. I've just been looking at the tutorial you're following and see that it seems a bit out-dated. -Jim On Wed, Apr 22, 2020 at 4:39 PM Jon

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jon Paris
# -*- coding: utf-8 -*- # - # AppConfig configuration made easy. Look inside private/appconfig.ini # Auth is for authenticaiton and access control # - fro

Re: [web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jim Steil
I'm guessing if at the top, they are getting called before db is defined. Are you able to share your db.py? -Jim On Wed, Apr 22, 2020 at 4:09 PM Jon Paris wrote: > Well there's not error message right now - but if I move these two lines: > > auth = Auth(db) > auth.define_tables(username=True)

[web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jon Paris
Well there's not error message right now - but if I move these two lines: auth = Auth(db) auth.define_tables(username=True) back to the beginning of the file (after the from ...) then I get this: Traceback (most recent call last): File "/Applications/web2py.app/Contents/MacOS/gluon/restricted

[web2py] Re: Beginners question on Authentication ...

2020-04-22 Thread Jim S
Jon Can you post the traceback that you're receiving? -Jim On Wednesday, April 22, 2020 at 3:08:14 PM UTC-5, Jon Paris wrote: > > In the section on basic Authentication in the documents ( > http://web2py.com/books/default/chapter/29/03/overview#An-image-blog) it > says to include in the model t

[web2py] Beginners question on Authentication ...

2020-04-22 Thread Jon Paris
In the section on basic Authentication in the documents ( http://web2py.com/books/default/chapter/29/03/overview#An-image-blog) it says to include in the model the following: from gluon.tools import Auth auth = Auth(db) auth.define_tables(username=True) And to add this to the default controller.

Re: [web2py] Re: debian 10 : mysql Ver 8.0.19 f : mysql_secure_installation

2020-04-22 Thread Jim Steil
I'm happy you got it working. -Jim On Wed, Apr 22, 2020 at 1:39 PM L c wrote: > oh i forgot i have hollowed your advice, updating pymysql > thanks again > > Le mercredi 22 avril 2020 20:38:09 UTC+2, L c a écrit : >> >> for now it works i don't know why (i have insttalled mysql connector but >>

Re: [web2py] Re: debian 10 : mysql Ver 8.0.19 f : mysql_secure_installation

2020-04-22 Thread L c
oh i forgot i have hollowed your advice, updating pymysql thanks again Le mercredi 22 avril 2020 20:38:09 UTC+2, L c a écrit : > > for now it works i don't know why (i have insttalled mysql connector but i > don't think this is the reason) > after a reboot (2 in fact) it is now ok > thank you ag

Re: [web2py] Re: debian 10 : mysql Ver 8.0.19 f : mysql_secure_installation

2020-04-22 Thread L c
for now it works i don't know why (i have insttalled mysql connector but i don't think this is the reason) after a reboot (2 in fact) it is now ok thank you again for your help Le mercredi 22 avril 2020 14:49:58 UTC+2, Jim S a écrit : > > I am using MySQL 8 on my development box. I'm running 5.

Re: [web2py] Re: debian 10 : mysql Ver 8.0.19 f : mysql_secure_installation

2020-04-22 Thread Jim S
I am using MySQL 8 on my development box. I'm running 5.7 on production servers. But, version 8 is working fine for me. I too had issues when I first installed version 8, but it wasn't with web2py connecting to it. My problems had more to do with interchanging data between version 5.7 and 8

Re: [web2py] Re: debian 10 : mysql Ver 8.0.19 f : mysql_secure_installation

2020-04-22 Thread Kevin Keller
I think there is an issue with web2py not supporting mysql version 8 and above. On Wed, 22 Apr 2020, 03:20 Jim S, wrote: > In your second post above you're connecting to mysql with user usertest > and a password. > > In you web2py example you're connecting with user root. > > I'm guessing that