Generated: Wed 2013-03-13 10:33 CET
Source file: /media/Envs/Envs/filer-gallery/lib/python2.7/site-packages/filer/templatetags/filer_admin_tags.py
Stats: 0 executed, 18 missed, 4 excluded, 17 ignored
import djangofrom django.conf import settingsfrom django.template import Libraryfrom distutils.version import LooseVersionregister = Library()def filer_actions(context): """ Track the number of times the action field has been rendered on the page, so we know which value to use. """ context['action_index'] = context.get('action_index', -1) + 1 return contextfiler_actions = register.inclusion_tag("admin/filer/actions.html", takes_context=True)(filer_actions)# Shamelessly taken from django-cms# This will go away when django < 1.4 compatibility will be droppedif LooseVersion(django.get_version()) < LooseVersion('1.4'): ADMIN_ICON_BASE = "%sadmin/img/admin/" % settings.STATIC_URL ADMIN_CSS_BASE = "%sadmin/css/" % settings.STATIC_URL ADMIN_JS_BASE = "%sadmin/js/" % settings.STATIC_URLelse: ADMIN_ICON_BASE = "%sadmin/img/" % settings.STATIC_URL ADMIN_CSS_BASE = "%sadmin/css/" % settings.STATIC_URL ADMIN_JS_BASE = "%sadmin/js/" % settings.STATIC_URL@register.simple_tagdef admin_icon_base(): return ADMIN_ICON_BASE@register.simple_tagdef admin_css_base(): return ADMIN_CSS_BASE@register.simple_tagdef admin_js_base(): return ADMIN_JS_BASE