>
> I'm reading a string value that is stored in my database. This string
> the main content of my webpage and it contains contents like
> javascript, css styling, and django template tags/filters.
>
> After I load string value by {{ stringValue|safe }} filter, everything
> is added to the page just as text; Javascript, css styling, template
> tags/filters all show up on the page.
>
> Can anyone tell me how I can load the content and execute/render the
> javascript, css styling, template tags/filters?

+1 for this sounding pretty weird.  But you might do the rendering and
manipulation in the view before rendering it to the template and get
what you want.

http://docs.djangoproject.com/en/dev/ref/templates/api/#compiling-a-string

Also, the little autoescape filter might help you prevent Django from
preventing you from blasting your foot off ;).
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#autoescape

bon voyage!

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.


Reply via email to