web_fragments/fragment.py
def resources_to_html(self, placement):
        """
        Get some resource HTML for this Fragment.

        `placement` is "head" or "foot".

        Returns a unicode string, the HTML for the head or foot of the page.
        """
        # - non url js could be wrapped in an anonymous function
        # - non url css could be rewritten to match the wrapper tag

        return '\n'.join(
            self.resource_to_html(resource)
            for resource in self.resources
            if resource.placement == placement
        )
def resources_to_html(self, placement):
        # - non url js could be wrapped in an anonymous function
        # - non url css could be rewritten to match the wrapper tag

        return '\n'.join(
            self.resource_to_html(resource)
            for resource in self.resources
            if resource.placement == placement
        )
def resources_to_html ( self , placement ) : # - non url js could be wrapped in an anonymous function # - non url css could be rewritten to match the wrapper tag return '\n' . join ( self . resource_to_html ( resource ) for resource in self . resources if resource . placement == placement )
Get some resource HTML for this Fragment.

        `placement` is "head" or "foot".

        Returns a unicode string, the HTML for the head or foot of the page.
Get some resource HTML for this Fragment .