Clean url_for in mtemplates

This commit is contained in:
Antonio de la Rosa 2025-12-03 21:00:47 +01:00
parent 6a0508328f
commit 8ca9038122

View file

@ -1,7 +1,7 @@
""" """
Paramecio2fm is a series of wrappers for Flask, mako and others and construct a simple headless cms. Cuchulufm is a series of wrappers for bottle, mako and others and construct a simple headless cms.
Copyright (C) 2023 Antonio de la Rosa Caballero Copyright (C) 2025 Antonio de la Rosa Caballero
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by it under the terms of the GNU Affero General Public License as published by
@ -35,7 +35,7 @@ except:
#import gettext #import gettext
import sys import sys
from cuchulu.libraries.i18n import I18n, PGetText from cuchulu.libraries.i18n import I18n, PGetText
from cuchulu.libraries.urls import make_url, make_media_url, add_get_parameters from cuchulu.libraries.urls import make_url, make_media_url, add_get_parameters, url_for
from cuchulu.libraries.db.formsutils import csrf_token from cuchulu.libraries.db.formsutils import csrf_token
from cuchulu.libraries.sessionplugin import get_session from cuchulu.libraries.sessionplugin import get_session
from cuchulu.wsgiapp import app from cuchulu.wsgiapp import app
@ -94,10 +94,6 @@ def env_theme(module, cache_enabled=True, cache_impl='', cache_args={}, module_d
#print(standard_templates) #print(standard_templates)
return TemplateLookup(directories=search_folders, default_filters=['h'], input_encoding='utf-8', encoding_errors='replace', cache_enabled=cache_enabled, cache_impl=cache_impl, cache_args=cache_args, module_directory=module_directory, filesystem_checks=config.reloader) return TemplateLookup(directories=search_folders, default_filters=['h'], input_encoding='utf-8', encoding_errors='replace', cache_enabled=cache_enabled, cache_impl=cache_impl, cache_args=cache_args, module_directory=module_directory, filesystem_checks=config.reloader)
def url_for(url, **kargs):
return app.get_url(url, **kargs)
def get_file(): def get_file():
return __file__ return __file__