equal
deleted
inserted
replaced
|
1 """Module containing the templatetags for rendering data especially for |
|
2 browsing. |
|
3 """ |
|
4 |
|
5 |
|
6 __authors__ = [ |
|
7 '"Madhusudan.C.S" <madhusudancs@fossee.in>', |
|
8 ] |
|
9 |
|
10 |
|
11 from django import template |
|
12 |
|
13 |
|
14 register = template.Library() |
|
15 |
|
16 |
|
17 @register.inclusion_tag('templatetags/_as_browse_textbooks.html') |
|
18 def as_list_textbooks(textbooks, title): |
|
19 """Returns a dictionary required to display the list of tasks. |
|
20 """ |
|
21 |
|
22 return { |
|
23 'tasks': textbooks, |
|
24 'title': title, |
|
25 } |
|
26 |
|
27 |
|
28 @register.inclusion_tag('templatetags/_as_div_field.html') |
|
29 def as_div_field(field): |
|
30 """Returns the field for each div form field. |
|
31 """ |
|
32 |
|
33 return { |
|
34 'field': field, |
|
35 } |