Commit a086d70f3c0ea8e8e948ad32fe6ca07f218d0fb2
1 parent
00b30377
Exists in
master
and in
5 other branches
Including templatetags to list links [Issue: #126]
Showing
1 changed file
with
18 additions
and
0 deletions
Show diff stats
courses/templatetags/list_topic_foruns.py
@@ -51,3 +51,21 @@ def list_topic_file_edit(request, topic): | @@ -51,3 +51,21 @@ def list_topic_file_edit(request, topic): | ||
51 | context['topic'] = topic | 51 | context['topic'] = topic |
52 | 52 | ||
53 | return context | 53 | return context |
54 | + | ||
55 | +@register.inclusion_tag('topic/link_topic_list_edit.html') | ||
56 | +def list_topic_link_edit(request,topic): | ||
57 | + context = { | ||
58 | + 'request':request | ||
59 | + } | ||
60 | + context['links'] = Link.objects.filter(topic = topic) | ||
61 | + context['slug'] = topic.slug | ||
62 | + return context | ||
63 | + | ||
64 | +@register.inclusion_tag('topic/link_topic_list.html') | ||
65 | +def list_topic_link(request,topic): | ||
66 | + context = { | ||
67 | + 'request':request | ||
68 | + } | ||
69 | + context['links'] = Link.objects.filter(topic = topic) | ||
70 | + context['slug'] = topic.slug | ||
71 | + return context |