FIx in ausers
This commit is contained in:
parent
8c390078dc
commit
9a6403a5f4
3 changed files with 16 additions and 3 deletions
|
|
@ -97,7 +97,7 @@ class PTemplate:
|
||||||
|
|
||||||
templates_loaded={}
|
templates_loaded={}
|
||||||
|
|
||||||
def __init__(self, environment, url_for):
|
def __init__(self, environment):
|
||||||
"""A class used how shortcuts for Mako template functions.
|
"""A class used how shortcuts for Mako template functions.
|
||||||
|
|
||||||
This class is used to have a set of shortcuts and hooks to Mako templates functions and methods over a series of default options.
|
This class is used to have a set of shortcuts and hooks to Mako templates functions and methods over a series of default options.
|
||||||
|
|
@ -145,7 +145,7 @@ class PTemplate:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.add_filter(url_for)
|
#self.add_filter(url_for)
|
||||||
|
|
||||||
#self.add_filter(csrf_token)
|
#self.add_filter(csrf_token)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ from parameciofast.libraries.keyutils import create_key_encrypt, create_key
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
env=env_theme(__file__)
|
env=env_theme(__file__)
|
||||||
t=PTemplate(env, app.url_path_for)
|
t=PTemplate(env)
|
||||||
|
|
||||||
usermodel=UserAdmin()
|
usermodel=UserAdmin()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,19 @@
|
||||||
from fastapi.responses import HTMLResponse
|
from fastapi.responses import HTMLResponse
|
||||||
from parameciofast.modules.fastadmin import admin_app
|
from parameciofast.modules.fastadmin import admin_app
|
||||||
from parameciofast.modules.fastadmin.libraries.config import modules_admin, modules_admin_icons
|
from parameciofast.modules.fastadmin.libraries.config import modules_admin, modules_admin_icons
|
||||||
|
from parameciofast.libraries.mtemplates import PTemplate, env_theme
|
||||||
|
import os
|
||||||
|
|
||||||
|
env=env_theme(__file__)
|
||||||
|
|
||||||
|
t=PTemplate(env)
|
||||||
|
|
||||||
|
#t.env.directories=admin_t.env.directories
|
||||||
|
|
||||||
|
tpl_path=os.path.dirname(__file__).replace('/admin', '')+'/templates/admin'
|
||||||
|
|
||||||
|
if t.env.directories[1]!=tpl_path:
|
||||||
|
t.env.directories.insert(1, tpl_path)
|
||||||
|
|
||||||
modules_admin.append(['Admin users', 'fastadmin_ausers', 'people-circle'])
|
modules_admin.append(['Admin users', 'fastadmin_ausers', 'people-circle'])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue