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'
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
# -
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
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
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
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
# -*- coding: utf-8 -*-
# -
# AppConfig configuration made easy. Look inside private/appconfig.ini
# Auth is for authenticaiton and access control
# -
fro
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)
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
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
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.
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
>>
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
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.
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
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
16 matches
Mail list logo