Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/c/s/cspace-HgSite-1.1/cspace/hgsite/site.py   cspace-HgSite(Download)
from mercurial.hgweb import common, webcommands, webutil
 
from .util import exists_in_wc, find_line_no, get_ext, guess_mimetype, \
                  hex_node, href_builder, http_date
 
def render_static(req, path, name, config, **kwargs):
    """Render static content."""
    mimetype = guess_mimetype(config.get('mimetype'), path,
                              'application/octet-stream')
    if req.url_node:

src/c/s/cspace-HgSite-1.1/cspace/hgsite/genshi.py   cspace-HgSite(Download)
 
from .site import cache_must_revalidate, renderer
from .util import guess_mimetype, hex_node
 
 
def render_markup_template(req, path, name, config, **kwargs):
    """Render a Genshi markup template."""
    method = name.split(':', 1)[-1]
    mimetype = guess_mimetype(config.get('mimetype'), path, 'text/xml')
    encoding = config.get('encoding', 'utf-8')
def render_text_template(req, path, name, config, **kwargs):
    """Render a Genshi text template."""
    method = name.split(':', 1)[-1]
    mimetype = guess_mimetype(config.get('mimetype'), path, 'text/plain')
    encoding = config.get('encoding', 'utf-8')