pytask/templates/task/view.html
author nishanth
Fri, 29 Jan 2010 23:34:19 +0530
changeset 10 c2001db39937
parent 9 554581fa3253
child 14 f2623fb8041a
permissions -rw-r--r--
renamed users.py to user.py and tasks to task in views folder and updated urls.py accordingly .

{% extends 'base.html' %}
{% block title %}
    {{task.title}}
{% endblock %}
{% block content %}
    <a href="/task/browse/">Browse tasks</a>
    <h3>{{ task.title }}</h3><br />
    <!-- we have to write our own datetime.strftime filter and use in the next line -->
    created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> on {{ task.creation_datetime.ctime }}<br />
    <br />Description:<br />
    <br />{{ task.desc }}<br />
    {% if comments %}
        <br/>comments:<br />
        {% for comment in comments %}
            <br /><a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> at {{ comment.creation_datetime.ctime }} wrote:<br />
        {{ comment.data }}<br />
        {% endfor %}
    {% endif %}
    
    {% if not is_guest %}
        <br />Add comment:<br />
        <form action="" method="post">
        <!-- we might even want to use forms here -->
        <textarea  name="data"></textarea><br />
        <input type="submit" value="Submit">
        </form>
    {% endif %}
{% endblock %}