On Sun, 2008-01-06 at 00:34 -0800, shabda wrote:
> I have a model attribute of type TextField, where I am storing html
> data. While displaying in template I do not want to escape it, and so
> should mark this as safe. How can I do this? I read the link at
> http://www.djangoproject.com/documentation/templates_python/#filters-and-auto-escaping
> , but that does not seem to help.
You can't mark the model attribute directly as safe. So mark the output
as safe in the template:
{{ obj.some_attribute|safe }}
Regards,
Malcolm
--
Success always occurs in private and failure in full view.
http://www.pointy-stick.com/blog/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---