On Mon, Mar 23, 2009 at 12:56 PM, Daniel Watkins < dan...@daniel-watkins.co.uk> wrote:
> > Hello all, > > I'm currently trying to render some text in Markdown format, that > contains templatetags. For example: > > [This]({% cms_link 22 %}) is a link. > > If I render this: > > {{ that_text|markdown }} > > the '{% cms_link 22 %}' remains verbatim in the output. > > As I see it, there are two potential solutions: > > * a solution using templatetags of which I am not yet aware, or > * some pre-processing within the view. > > Is this a correct assumption, or am I missing something? > > If I have to resort to the latter, what would it involve? How do I pass > a templatetag (rather than just a variable) into a template processor? > > > Thanks in advance, > > > Dan > > > > > I would write a template filter that takes a block of text and renders it as a template, and then render that as markdown so it would look like: {{ that_text|templatize|markdown }} Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---