Commit 1a053cf9d7f70a8678945bf8baa826d30029b3f0
1 parent
4e0a2bef
use context.flatten() now that 1.6 support is gone
Showing
1 changed file
with
2 additions
and
8 deletions
| ... | ... | @@ -178,10 +178,7 @@ class RenderCommentFormNode(CommentFormNode): |
| 178 | 178 | "comments/%s/form.html" % ctype.app_label, |
| 179 | 179 | "comments/form.html" |
| 180 | 180 | ] |
| 181 | - # Django 1.6 does not have context.flatten(). | |
| 182 | - context_dict = {} | |
| 183 | - for d in context.dicts: | |
| 184 | - context_dict.update(d) | |
| 181 | + context_dict = context.flatten() | |
| 185 | 182 | context_dict['form'] = self.get_form(context) |
| 186 | 183 | formstr = render_to_string(template_search_list, context_dict) |
| 187 | 184 | return formstr |
| ... | ... | @@ -219,10 +216,7 @@ class RenderCommentListNode(CommentListNode): |
| 219 | 216 | "comments/list.html" |
| 220 | 217 | ] |
| 221 | 218 | qs = self.get_queryset(context) |
| 222 | - # Django 1.6 does not have context.flatten(). | |
| 223 | - context_dict = {} | |
| 224 | - for d in context.dicts: | |
| 225 | - context_dict.update(d) | |
| 219 | + context_dict = context.flatten() | |
| 226 | 220 | context_dict['comment_list'] = self.get_context_value_from_queryset(context, qs) |
| 227 | 221 | liststr = render_to_string(template_search_list, context_dict) |
| 228 | 222 | return liststr | ... | ... |
Please
register
or
login
to post a comment