We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d783ad commit 7f97ef6Copy full SHA for 7f97ef6
bootstrapform/templatetags/bootstrap.py
@@ -1,4 +1,4 @@
1
-from django import forms
+from django import forms, VERSION as django_version
2
from django.template import Context
3
from django.template.loader import get_template
4
from django import template
@@ -77,6 +77,9 @@ def render(element, markup_classes):
77
template = get_template("bootstrapform/form.html")
78
context = Context({'form': element, 'classes': markup_classes})
79
80
+ if django_version >= (1, 8):
81
+ context = context.flatten()
82
+
83
return template.render(context)
84
85
0 commit comments