Esempio n. 1
0
 def test_gallery(self):
     print parse("<p>[gallery ids=\"12916,12917,12918,12919,12920\"]</p>")
Esempio n. 2
0
 def test_caption(self):
     parse("[caption a='1' b='2'][/caption] [caption]Simple caption[/caption] [caption a='1' b='2']")
def shortcodes_replace(value):
    return parser.parse(value)
def shortcodes_replace(value, request=None):
    """
    A filter for parsing a string on the format ``[shortcode keyword=value]``
    using the shortcodes parser method.
    """
    return parser.parse(value, request)
Esempio n. 5
0
def shortcodes_replace(value):
    return parser.parse(value)
def shortcodes_replace(value, render_format='html'):
    if render_format not in SHORTCODE_FORMATS:
        raise template.TemplateSyntaxError(
            'Invalid format specified for shortcodes')
    return parser.parse(value, render_format=render_format)