Added generate admin to pramecio2
This commit is contained in:
parent
b845f78e3f
commit
97e89736b5
9 changed files with 735 additions and 8 deletions
|
|
@ -90,8 +90,8 @@ for app_load in config_admin.values():
|
|||
#print(app_load[1])
|
||||
|
||||
@admin_app.route('/admin')
|
||||
@admin_app.route('/admin/<module>')
|
||||
@admin_app.route('/admin/<module>/<submodule>')
|
||||
@admin_app.route('/admin/<module>', methods=['GET', 'POST'])
|
||||
@admin_app.route('/admin/<module>/<submodule>', methods=['GET', 'POST'])
|
||||
def admin(module='', submodule=''):
|
||||
|
||||
"""
|
||||
|
|
@ -109,9 +109,15 @@ def admin(module='', submodule=''):
|
|||
|
||||
if path_module in arr_modules_admin:
|
||||
|
||||
content=arr_modules_admin[path_module].admin()
|
||||
content=arr_modules_admin[path_module].admin(t=t)
|
||||
|
||||
return t.load_template('content.phtml', title=I18n.lang('admin', 'paramecio_admin', 'Paramecio admin'), contents=content)
|
||||
if type(content).__name__=='str':
|
||||
|
||||
return t.load_template('content.phtml', title=I18n.lang('admin', 'paramecio_admin', 'Paramecio admin'), contents=content)
|
||||
|
||||
else:
|
||||
|
||||
return content
|
||||
|
||||
else:
|
||||
abort(404)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue