Fixes in adminutils dropping circular imports
This commit is contained in:
parent
2dd71d493a
commit
5221661417
1 changed files with 1 additions and 30 deletions
|
|
@ -4,7 +4,6 @@ from collections import OrderedDict
|
||||||
from paramecio.citoplasma.sessions import get_session
|
from paramecio.citoplasma.sessions import get_session
|
||||||
from paramecio.citoplasma.urls import make_url
|
from paramecio.citoplasma.urls import make_url
|
||||||
from paramecio.cromosoma.webmodel import WebModel
|
from paramecio.cromosoma.webmodel import WebModel
|
||||||
from paramecio.citoplasma.mtemplates import PTemplate
|
|
||||||
from paramecio.citoplasma.i18n import I18n
|
from paramecio.citoplasma.i18n import I18n
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -72,32 +71,4 @@ def check_login():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def base_admin(func_view, env, title, **args):
|
|
||||||
|
|
||||||
env.directories.insert(1, config.paramecio_root+'/modules/admin/templates')
|
|
||||||
|
|
||||||
content_index=''
|
|
||||||
|
|
||||||
connection=WebModel.connection()
|
|
||||||
#Fix, make local variable
|
|
||||||
|
|
||||||
t=PTemplate(env)
|
|
||||||
|
|
||||||
s=get_session()
|
|
||||||
|
|
||||||
if check_login():
|
|
||||||
|
|
||||||
#Load menu
|
|
||||||
|
|
||||||
menu=get_menu(config_admin.modules_admin)
|
|
||||||
|
|
||||||
lang_selected=get_language(s)
|
|
||||||
|
|
||||||
content_index=func_view(connection, t, s, **args)
|
|
||||||
|
|
||||||
return t.load_template('admin/content.html', title=title, content_index=content_index, menu=menu, lang_selected=lang_selected, arr_i18n=I18n.dict_i18n)
|
|
||||||
|
|
||||||
else:
|
|
||||||
redirect(make_url(config.admin_folder))
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue