MULTI_USER_MODE setup error

18 views
Skip to first unread message

Geo

unread,
Mar 28, 2023, 12:30:40 PM3/28/23
to web2py-users
Greetings,
I'm trying the techer/MULTI_USER_MODE but I encounter some issues.
With a default setup I set MULTI_USER_MODE = True in /admin/models/0.py

If I try to load the page
or

I get this

Traceback (most recent call last):
File "D:\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
File "D:\web2py\applications\admin\views\default/user.html", line 80, in <module>
TypeError: 'NoneType' object is not subscriptable

or this

Traceback (most recent call last):
File "D:\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
File "D:\web2py\applications\admin\views\default/user.html", line 59, in <module>
{{=
form}}
^
IndexError: list index out of range

auth_user table is empty
I really do not see how I could register the first user and then go ahead.

If I set MULTI_USER_MODE = False and login with the default password I land on http://localhost/admin/default/site as usual.
If, before logging out, I switch back MULTI_USER_MODE = True and relaod the page I can still see the right panel and on top I can see the login/register buttons
Immagine 2023-03-28 182912.png
 But they do not work as
http://localhost/admin/default/user/register?_next=/admin/default/site throws again the NoneType error I pasted above.

Can you please help me?
Thanks and best regards

Leonel Câmara

unread,
Mar 28, 2023, 2:56:27 PM3/28/23
to web2py-users
Can't really help you without looking at some application code as I have no idea what techer/MULTI_USER_MODE is, but you can create a user directly in the database using appadmin and inserting a row in the auth_user table if needed.
Reply all
Reply to author
Forward
0 new messages