Neutralize some assumptions

This commit is contained in:
Scot Hacker 2014-11-07 10:42:53 -08:00
parent 5ea9d3a444
commit 37ea8a8a75
7 changed files with 11 additions and 31 deletions

View file

@ -37,6 +37,11 @@ class AddItemForm(ModelForm):
widget=forms.widgets.TextInput(attrs={'size': 35}) widget=forms.widgets.TextInput(attrs={'size': 35})
) )
# note = forms.CharField(
# widget=forms.TextArea(attrs={'size': 35})
# )
note = forms.CharField(widget=forms.Textarea())
class Meta: class Meta:
model = Item model = Item

View file

@ -4,15 +4,6 @@
{% block content %} {% block content %}
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<h2>Add a list:</h2> <h2>Add a list:</h2>
<form action="" method="post"> <form action="" method="post">

View file

@ -1,10 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block page_heading %}GTD (Getting Things Done){% endblock %}
{% block extrahead %} {% block extrahead %}
<!-- CSS and JavaScript for django-todo --> <!-- CSS and JavaScript for django-todo -->
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}todo/css/styles.css" /> <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}todo/css/styles.css" />
<script src="{{STATIC_URL}}js/ui.datepicker.js" type="text/javascript"></script>
<script src="{{STATIC_URL}}todo/js/jquery.tablednd_0_5.js" type="text/javascript"></script> <script src="{{STATIC_URL}}todo/js/jquery.tablednd_0_5.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">

View file

@ -5,16 +5,7 @@
{% block content %} {% block content %}
<h1>Todo Lists</h1>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<h1>To-do Lists</h1>
<p>{{ item_count }} items in {{ list_count }} lists</p> <p>{{ item_count }} items in {{ list_count }} lists</p>
@ -27,15 +18,8 @@
<li><a class="todo" href="{% url 'todo-incomplete_tasks' item.id item.slug %}">{{ item.name }} </a> ({{ item.incomplete_tasks.count }}/{{ item.item_set.count }})</li> <li><a class="todo" href="{% url 'todo-incomplete_tasks' item.id item.slug %}">{{ item.name }} </a> ({{ item.incomplete_tasks.count }}/{{ item.item_set.count }})</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endfor %} {% endfor %}
<div class="todo-break">
&nbsp;
</div>
<p><a href="{% url 'todo-add_list' %}">Create new todo list</a></p> <p><a href="{% url 'todo-add_list' %}">Create new todo list</a></p>
{% endblock %} {% endblock %}

View file

@ -78,7 +78,8 @@ $(document).ready(function() {
<td><label for="id_notify">Notify*:</label> <input type="checkbox" checked="checked" name="notify" value="1" id="notify"></td> <td><label for="id_notify">Notify*:</label> <input type="checkbox" checked="checked" name="notify" value="1" id="notify"></td>
</tr> </tr>
<tr> <tr>
<td colspan="5"><label for="id_note">Note:</label> {{ form.note }} <td><label for="id_note">Note:</label>
{{ form.note }}
<p class="minor">*Email notifications will only be sent if task is assigned to someone besides yourself.</p> <p class="minor">*Email notifications will only be sent if task is assigned to someone besides yourself.</p>
</td> </td>
</tr> </tr>

View file

@ -98,7 +98,7 @@ $(document).ready(function() {
<h3>Add comment</h3> <h3>Add comment</h3>
<textarea name="comment-body" rows="8" cols="40"></textarea> <textarea name="comment-body"></textarea>
<p><input class="todo-button"type="submit" value="Submit"></p> <p><input class="todo-button"type="submit" value="Submit"></p>
</form> </form>