]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/context_processors.py
Changes for django 2.2
[sommitrealweird.git] / sommitrealweird / bpcms / context_processors.py
index 72c335d51e635d17a01253d7b5f5b28561706488..e92e8cef2db13b0bacd88139c687fa12c2ed2dd9 100644 (file)
@@ -33,7 +33,7 @@ def content_menu(request):
                 pass
 
         menu_items.sort( \
-            cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
+            key=lambda x: x['title'].lower())
         cache.set('bpcms_mainmenu', menu_items, 3600)
 
     return {
@@ -87,7 +87,7 @@ def content_submenu(request):
                     )
 
         menu_items.sort( \
-            cmp=lambda x,y: cmp(x['title'].lower(), y['title'].lower()))
+            key=lambda x: x['title'].lower())
 
         cache.set('bpcms_contentmenu_%s' %("/".join(folderpath)), menu_items)