Change the textbook list templatetag to task list template tag.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Tue, 01 Feb 2011 15:02:52 +0530
changeset 546 6393b77c3c68
parent 545 3a86d85333a3
child 547 1bfa67f465b4
Change the textbook list templatetag to task list template tag.
pytask/templates/task/browse_textbooks.html
pytask/templatetags/browse_helpers.py
--- a/pytask/templates/task/browse_textbooks.html	Tue Feb 01 15:01:46 2011 +0530
+++ b/pytask/templates/task/browse_textbooks.html	Tue Feb 01 15:02:52 2011 +0530
@@ -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 %}
 
 
--- a/pytask/templatetags/browse_helpers.py	Tue Feb 01 15:01:46 2011 +0530
+++ b/pytask/templatetags/browse_helpers.py	Tue Feb 01 15:02:52 2011 +0530
@@ -15,13 +15,13 @@
 
 
 @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(),
       }