Added version check for 1.7 to create context dict.
parent
81f2faebc6
commit
d1911519ed
|
|
@ -219,7 +219,11 @@ class SortableAdmin(SortableAdminBase, ModelAdmin):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
verbose_name_plural = opts.verbose_name_plural
|
verbose_name_plural = opts.verbose_name_plural
|
||||||
|
|
||||||
|
if VERSION <= (1, 7):
|
||||||
|
context = {}
|
||||||
|
else:
|
||||||
context = self.admin_site.each_context(request)
|
context = self.admin_site.each_context(request)
|
||||||
|
|
||||||
context.update({
|
context.update({
|
||||||
'title': u'Drag and drop {0} to change display order'.format(
|
'title': u'Drag and drop {0} to change display order'.format(
|
||||||
capfirst(verbose_name_plural)),
|
capfirst(verbose_name_plural)),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue