So I have some text fields in the db that have some embedded html in the 
text.  How do I get the template to render the text as html?

The text fields are recipe.ingredients and recipe.instructions

<html>
<head>
  <title> Recipes </title>
  <style type="text/css">
    .RecipeName{
      font-size: large;
      font-weight: bold;
    }
    .Recipe{
       width: 700px;
       margin-left: 20px;
       display: none;
    }
  </style>
  <script type="text/javascript">
    function toggle(id) {
      var e = document.getElementById(id);
      if (e) {
        e.style.display = e.style.display == 'block' ? 'none' : 'block';
      }
    }
  </script>
</head>
<body>
{% if recipe_list %}
    <div>
    {% for recipe in recipe_list %}
      <div class="RecipeName">
        <a href='javascript:toggle("{{ recipe.recipe_name }}")' > {{ 
recipe.recipe_name }}</a>
      </div>
     <div class="Recipe" id="{{ recipe.recipe_name }}">
        <div>
          {{ recipe.ingredients}}
        </div>
        <div>
        {{ recipe.instructions}}
        </div>
     </div>
    {% endfor %}
 </div>


{% else %}
    <p>No recipes are available.</p>
{% endif %}

Thanks.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to