4bb1ff1cc21817fae0fad3993d65e5f4ff4d16b8,utils/templatetags/bookmarklet_includes.py,,include_bookmarklet_css,#,19

Before Change


def include_bookmarklet_css():
    text = []
    css_files = settings.COMPRESS_CSS["bookmarklet"]["source_filenames"]
    for filename in css_files:
        abs_filename = os.path.join(settings.MEDIA_ROOT, filename)
        f = open(abs_filename, "r")
        css = f.read()
        css = css.replace("\"", "\\"").replace("\n", " ")
        text.append(css)
    
    return "".join(text)
    

After Change


    
@register.simple_tag
def include_bookmarklet_css():
    return settings.JAMMIT.render_code("stylesheets", "bookmarklet")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: samuelclay/NewsBlur
Commit Name: 4bb1ff1cc21817fae0fad3993d65e5f4ff4d16b8
Time: 2011-11-24
Author: samuel@ofbrooklyn.com
File Name: utils/templatetags/bookmarklet_includes.py
Class Name:
Method Name: include_bookmarklet_css


Project Name: matthewwithanm/django-imagekit
Commit Name: 71c56c7d6affae7506b298ad7f7c3855ce0e93a9
Time: 2012-02-12
Author: matthew@exanimo.com
File Name: imagekit/models/fields.py
Class Name: ImageSpecFieldFile
Method Name: generate


Project Name: samuelclay/NewsBlur
Commit Name: 4bb1ff1cc21817fae0fad3993d65e5f4ff4d16b8
Time: 2011-11-24
Author: samuel@ofbrooklyn.com
File Name: utils/templatetags/bookmarklet_includes.py
Class Name:
Method Name: include_bookmarklet_js