Source

Mango / template.py

Full commit
from django.utils.safestring import mark_safe


class Script(object):
    def __init__(self, src):
        self.src = src

    def __unicode__(self):
        return mark_safe(u'<script src="%s"></script>' % self.src)


class StyleSheet(object):
    def __init__(self, href, media=None):
        self.href = href
        self.media = media

    def __unicode__(self):
        if self.media:
            text = u'<link rel="stylesheet" href="%s" media="%s" />' % (self.href, self.media)
        else:
            text = u'<link rel="stylesheet" href="%s" />' % self.href
        return mark_safe(text)