summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhusudan.C.S2011-02-01 15:02:52 +0530
committerMadhusudan.C.S2011-02-01 15:02:52 +0530
commit7b6a4611687c4fb524f04d70078ef58a81fc3d35 (patch)
tree65678ceda2441ed6ebc5dce47d30d65b7467da42
parent30cd7b2b0c7c99223ed9931a3e56a14ce16503f3 (diff)
downloadpytask-7b6a4611687c4fb524f04d70078ef58a81fc3d35.tar.gz
pytask-7b6a4611687c4fb524f04d70078ef58a81fc3d35.tar.bz2
pytask-7b6a4611687c4fb524f04d70078ef58a81fc3d35.zip
Change the textbook list templatetag to task list template tag.
-rw-r--r--pytask/templates/task/browse_textbooks.html14
-rw-r--r--pytask/templatetags/browse_helpers.py6
2 files changed, 10 insertions, 10 deletions
diff --git a/pytask/templates/task/browse_textbooks.html b/pytask/templates/task/browse_textbooks.html
index 74eaa41..0f22956 100644
--- a/pytask/templates/task/browse_textbooks.html
+++ b/pytask/templates/task/browse_textbooks.html
@@ -6,31 +6,31 @@
{% block content %}
{% if aero_textbooks %}
- {% as_list_textbooks aero_textbooks "Aerospace Engineering" %}
+ {% as_list_tasks aero_textbooks "Aerospace Engineering" %}
{% endif %}
{% if chemical_textbooks %}
- {% as_list_textbooks chemical_textbooks "Chemical Engineering" %}
+ {% as_list_tasks chemical_textbooks "Chemical Engineering" %}
{% endif %}
{% if computerscience_textbooks %}
- {% as_list_textbooks computerscience_textbooks "Computer Science and Engineering" %}
+ {% as_list_tasks computerscience_textbooks "Computer Science and Engineering" %}
{% endif %}
{% if electrical_textbooks %}
- {% as_list_textbooks electrical_textbooks "Electrical Engineering" %}
+ {% as_list_tasks electrical_textbooks "Electrical Engineering" %}
{% endif %}
{% if engineeringphysics_textbooks %}
- {% as_list_textbooks engineeringphysics_textbooks "Engineering Physics Engineering" %}
+ {% as_list_tasks engineeringphysics_textbooks "Engineering Physics Engineering" %}
{% endif %}
{% if mechanical_textbooks %}
- {% as_list_textbooks mechanical_textbooks "Mechanical Engineering" %}
+ {% as_list_tasks mechanical_textbooks "Mechanical Engineering" %}
{% endif %}
{% if metallurgical_textbooks %}
- {% as_list_textbooks metallurgical_textbooks "Metallurgical Engineering and Materials Science" %}
+ {% as_list_tasks metallurgical_textbooks "Metallurgical Engineering and Materials Science" %}
{% endif %}
diff --git a/pytask/templatetags/browse_helpers.py b/pytask/templatetags/browse_helpers.py
index 3dc8cd1..a0b1bf6 100644
--- a/pytask/templatetags/browse_helpers.py
+++ b/pytask/templatetags/browse_helpers.py
@@ -15,13 +15,13 @@ register = template.Library()
@register.inclusion_tag('templatetags/_as_browse_textbooks.html')
-def as_list_textbooks(textbooks, title):
+def as_list_tasks(tasks, title):
"""Returns a dictionary required to display the list of tasks.
"""
return {
- 'tasks': textbooks,
- 'title': title,
+ 'tasks': tasks,
+ 'title': title.capitalize(),
}