From 9cfbf07909c72beffdfe44f0e38652bfefdb40db Mon Sep 17 00:00:00 2001 From: Emily Scoular Date: Fri, 5 Aug 2016 09:42:42 -0700 Subject: [PATCH] Fix context for boundfields when Django version >= 1.8 --- bootstrapform/templatetags/bootstrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrapform/templatetags/bootstrap.py b/bootstrapform/templatetags/bootstrap.py index c720db8..71512aa 100644 --- a/bootstrapform/templatetags/bootstrap.py +++ b/bootstrapform/templatetags/bootstrap.py @@ -77,8 +77,8 @@ def render(element, markup_classes): template = get_template("bootstrapform/form.html") context = Context({'form': element, 'classes': markup_classes}) - if django_version >= (1, 8): - context = context.flatten() + if django_version >= (1, 8): + context = context.flatten() return template.render(context)