Fixes
This commit is contained in:
parent
9efbeb7b4c
commit
e2b851ef47
3 changed files with 10 additions and 7 deletions
|
|
@ -94,7 +94,7 @@ def prepare_app():
|
|||
|
||||
for controller in dir_controllers:
|
||||
|
||||
if controller.find('.py')!=-1 and controller.find('__init__')==-1:
|
||||
if controller.endswith('.py') and controller.find('__init__')==-1:
|
||||
|
||||
controller_py=controller.replace('.py', '')
|
||||
|
||||
|
|
@ -104,9 +104,11 @@ def prepare_app():
|
|||
|
||||
if added_app[1]!='':
|
||||
|
||||
app_name=getattr(a, added_app[1])
|
||||
if controller_py=='app':
|
||||
|
||||
app_name=getattr(a, added_app[1])
|
||||
|
||||
app_mounts[added_app[2]]=app_name
|
||||
app_mounts[added_app[2]]=app_name
|
||||
|
||||
arr_module_path[key_app]=os.path.dirname(sys.modules[module_app].__file__)
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@ from paramecio.libraries.sendmail import SendMail
|
|||
from paramecio.libraries.db.formsutils import check_csrf
|
||||
from paramecio.modules.admin2.libraries.config import modules_admin
|
||||
from paramecio.modules.admin2.libraries.check_login_tries import check_login_tries
|
||||
from paramecio.modules.admin2 import admin_app
|
||||
|
||||
admin_app=Bottle()
|
||||
admin_app.install(SessionPlugin())
|
||||
admin_app.install(check_login)
|
||||
#admin_app=Bottle()
|
||||
#admin_app.install(SessionPlugin())
|
||||
#admin_app.install(check_login)
|
||||
|
||||
env=env_theme(__file__)
|
||||
t=PTemplate(env)
|
||||
|
|
|
|||
|
|
@ -152,6 +152,6 @@ def user_options(url, id, arr_row):
|
|||
options=[]
|
||||
options.append('<a href="'+add_get_parameters(url, op_admin=1, id=id)+'">'+_('Edit')+'</a>')
|
||||
if arr_row['privileges']==1:
|
||||
options.append(f'<a href="{app.get_url('admin_app.admin_permissions', user_id=id)}">'+_('User access')+'</a>')
|
||||
options.append('<a href="'+app.get_url('admin_app.admin_permissions', user_id=id)+'">'+_('User access')+'</a>')
|
||||
options.append('<a href="'+add_get_parameters(url, op_admin=3, id=id)+'">'+_('Delete')+'</a>')
|
||||
return options
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue