comparison forums/views/main.py @ 1161:a60aabced346

Converting forums to V3 design.
author Brian Neal <bgneal@gmail.com>
date Tue, 07 Feb 2017 20:44:00 -0600
parents e1c03da72818
children 68811c583bfb
comparison
equal deleted inserted replaced
1160:b84ce2d7e93d 1161:a60aabced346
108 cats = sorted(cats.values(), cmpdef) 108 cats = sorted(cats.values(), cmpdef)
109 109
110 return render(request, 'forums/index.html', { 110 return render(request, 'forums/index.html', {
111 'cats': cats, 111 'cats': cats,
112 'feeds': feeds, 112 'feeds': feeds,
113 'V3_DESIGN': True,
113 }) 114 })
114 115
115 116
116 def forum_index(request, slug): 117 def forum_index(request, slug):
117 """ 118 """
138 raise Http404 139 raise Http404
139 140
140 get_topic_unread_status(forum, page.object_list, request.user) 141 get_topic_unread_status(forum, page.object_list, request.user)
141 attach_topic_page_ranges(page.object_list) 142 attach_topic_page_ranges(page.object_list)
142 143
143 # we do this for the template since it is rendered twice
144 page_nav = render_to_string('forums/pagination.html', {'page': page})
145
146 can_moderate = perms.can_moderate(forum, request.user) 144 can_moderate = perms.can_moderate(forum, request.user)
147 145
148 return render(request, 'forums/forum_index.html', { 146 return render(request, 'forums/forum_index.html', {
149 'forum': forum, 147 'forum': forum,
150 'feed': feed, 148 'feed': feed,
151 'page': page, 149 'page': page,
152 'page_nav': page_nav,
153 'can_moderate': can_moderate, 150 'can_moderate': can_moderate,
151 'V3_DESIGN': True,
154 }) 152 })
155 153
156 154
157 def topic_index(request, id): 155 def topic_index(request, id):
158 """ 156 """