How can I implement this in a view. I am not sure how to call that markmin
action to be used instead of MARKMIN helper.
Dana srijeda, 8. svibnja 2013. 17:23:24 UTC+2, korisnik Massimo Di Pierro
napisao je:
>
> There is an "official" syntax for this.
>
> @{component:controller/function/args}
Thanks
On Wednesday, May 8, 2013 4:23:24 PM UTC+1, Massimo Di Pierro wrote:
>
> There is an "official" syntax for this.
>
> @{component:controller/function/args}
>
> To enable this and enable OEMBED I do:
>
> def markmin(body):
> from gluon.contrib.autolinks import expand_one
> def co
There is an "official" syntax for this.
@{component:controller/function/args}
To enable this and enable OEMBED I do:
def markmin(body):
from gluon.contrib.autolinks import expand_one
def component(text):
items = text.split('/')
controller, function, args = items[0],
For anyone interested in my monologue...
Function to my previous ideas, a function as follows could handle both
internal and external URLs.
I also included a simple check for allowed domains:
def __component(text):
if text and text.lower().strip().startswith('http'):
from urlparse
I can do something like this...
mytext = """
``default/get_cms_article/4``:component
"""
def __component(text):
items = text.split('/')
controller, function, args = items[0], items[1], items[2:]
return LOAD(controller, function, args=args, ajax=True).xml()
MARKMIN_ENV = dict(
c
5 matches
Mail list logo