Am building a Q&A page, sort of stackoverflow.com kinda page! Am
having a bit of a problem trying to render the form. Am pasing 3
objects to the template that renders the page i.e. Question object,
Answers related to the question and Answer form object.

In the first part of the page i want to display the Question, then the
answers list related to the question follows, then at the bottom of
the page i display my form to enter the new answer.

On my template when i use the {{ extends "base_site.html" }} tag,
then only the form get rendered without the first part of questions,
When i remove that tag then only the Question section get displayed
minus the form!!

How can i go round this problem?

this my template;

{% extends "base_site.html" %}

{% block title %}{% endblock %}

<link rel="stylesheet" type="text/css" href="/site_media/twine.css" /
>

<div id="container">

<div id="content">


<div id="mainbar">


    <div id="subheader">
     <h1>{{ questobj.question }}</h1>
    </div>

    <div class="answer-summary">
         <br><font color="black">{{ questobj.notes }}</font></br>
    </div>


        {% regroup answerobj.object_list by answer as ans_list %}{{ ans_list|
length }} -->


        {% for answers in answerobj.object_list %}
                <br><h1><a href="/list_answer/">{{ answers.answer 
}}</a></h1></br>
                <font size="-2" color="gold">posted on:{{ answers.post_date }}</
font>
                by:<b><font color="gold"><a 
href="/user_profile/">{{answers.userid}}
</b></font>

       {% endfor %}

    </div>
  </div>
</div> <!-- container -->


<div>

  <form action="." method="POST">


   <table>

     {{ form.as_table }}

   </table>

   <div class="submit-row">

   <p><input type="submit" value="submit" name=_"save"></p>

  </div>

  </form>

</div>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to