예제 #1
0
    def process_module(self, module, embeds):
        """
        Aggregates embedded js/css files/strings
        """
        part = module.html_head()
        if part:
            embeds['heads'].append(_utf8(part))

        part = module.css_files()
        if part:
            if isinstance(part, basestring):
                embeds['css_files'].append(part)
            else: # list
                embeds['css_files'].extend(part)

        part = module.embedded_css()
        if part:
            embeds['css_inline'].append(_utf8(part))

        part = module.javascript_files()
        if part:
            if isinstance(part, basestring):
                embeds['js_files'].append(part)
            else: # list
                embeds['js_files'].extend(part)

        part = module.embedded_javascript()
        if part:
            embeds['js_inline'].append(_utf8(part))
예제 #2
0
def fetch(url, *args, **kwargs):
    return HTTPClient(_utf8(url), *args, **kwargs).fetch()
예제 #3
0
def fetch(url, *args, **kwargs):
    url = _utf8(url)
    c = HTTPClient(url,*args, **kwargs)
    d = c.fetch()
    return d
예제 #4
0
def fetch(url, *args, **kwargs):
    return HTTPClient(_utf8(url), *args, **kwargs).fetch()