Skip to content

Commit

Permalink
Django 4.1 compatible tags
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Nov 25, 2022
1 parent 750ea19 commit fb95af9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cms/templatetags/cms_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def boolean_icon(value):
'<img src="%sicon-%s.gif" alt="%s" />' % (CMS_ADMIN_ICON_BASE, BOOLEAN_MAPPING.get(value, 'unknown'), value))


@register.tag(name="page_submit_row")
class PageSubmitRow(InclusionTag):
name = 'page_submit_row'
template = 'admin/cms/page/submit_row.html'
Expand All @@ -148,9 +149,6 @@ def get_context(self, context):
return context


register.tag(PageSubmitRow)


def in_filtered(seq1, seq2):
return [x for x in seq1 if x in seq2]

Expand All @@ -166,16 +164,14 @@ def admin_static_url():
return getattr(settings, 'ADMIN_MEDIA_PREFIX', None) or ''.join([settings.STATIC_URL, 'admin/'])


@register.tag(name="cms_admin_icon_base")
class CMSAdminIconBase(Tag):
name = 'cms_admin_icon_base'

def render_tag(self, context):
return CMS_ADMIN_ICON_BASE


register.tag(CMSAdminIconBase)


@register.inclusion_tag('admin/cms/page/plugin/submit_line.html', takes_context=True)
def submit_row_plugin(context):
"""
Expand Down

0 comments on commit fb95af9

Please sign in to comment.