Ticket #25553: lazy_admin_static_static.patch

File lazy_admin_static_static.patch, 905 bytes (added by David Sanders, 9 years ago)
  • django/contrib/admin/templatetags/admin_static.py

    From 0312f243e4cbd7bf9ff26ae761a5e212feedf5b6 Mon Sep 17 00:00:00 2001
    From: David Sanders <dsanders11@ucsbalum.com>
    Date: Tue, 13 Oct 2015 18:06:58 -0700
    Subject: [PATCH] Add lazy version of admin_static's static
    
    ---
     django/contrib/admin/templatetags/admin_static.py | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/django/contrib/admin/templatetags/admin_static.py b/django/contrib/admin/templatetags/admin_static.py
    index b767dc7..1d47e82 100644
    a b  
    11from django.apps import apps
    22from django.template import Library
     3from django.utils.functional import lazy
    34
    45register = Library()
    56
    def static(path):  
    1516        else:
    1617            from django.templatetags.static import static as _static
    1718    return _static(path)
     19
     20
     21static_lazy = lazy(static, str)
Back to Top