Skip to content

Commit 088e2ca

Browse files
committed
Removed dead code which used to work around a now fixed bug (and also used a now removed django function)
- Legacy-Id: 12813
1 parent 2b4f4b0 commit 088e2ca

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

ietf/doc/templatetags/ietf_filters.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from django.conf import settings
1616
from django.utils.html import escape
1717
from django.template.defaultfilters import truncatewords_html, linebreaksbr, stringfilter, striptags, urlize
18-
from django.template import resolve_variable
1918
from django.utils.safestring import mark_safe, SafeData
2019
from django.utils.html import strip_tags
2120

@@ -396,17 +395,6 @@ def has_role(user, role_names):
396395
return False
397396
return has_role(user, role_names.split(','))
398397

399-
@register.filter
400-
def stable_dictsort(value, arg):
401-
"""
402-
Like dictsort, except it's stable (preserves the order of items
403-
whose sort key is the same). See also bug report
404-
http://code.djangoproject.com/ticket/12110
405-
"""
406-
decorated = [(resolve_variable('var.' + arg, {'var' : item}), item) for item in value]
407-
decorated.sort(lambda a, b: cmp(a[0], b[0]) if a[0] and b[0] else -1 if b[0] else 1 if a[0] else 0)
408-
return [item[1] for item in decorated]
409-
410398
@register.filter
411399
def ad_area(user):
412400
if user and user.is_authenticated():

0 commit comments

Comments
 (0)