Ignore:
Timestamp:
10 Apr 2012, 06:42:16 (12 years ago)
Author:
uli
Message:

Update docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py

    r8065 r8087  
    2828waeup_kofa = Library('waeup_kofa', 'static')
    2929
     30def render_ico(url):
     31    """An inclusion renderer for hurry.resource for files with .ico extension.
     32    """
     33    return '<link rel="shortcut icon" type="image/x-icon" href="%s" />' % url
     34
     35# Monkey patch hurry.resource to support .ico inclusions.
     36inclusion_renderers['.ico'] = render_ico
     37EXTENSIONS.append('.ico')
     38
    3039#: A resource that includes a favicon.
    31 #: In the `gerResource()` method of the theme
    32 #: require the JavaScript code to be rendered into the page::
     40#:
     41#: In the `getResource()` method of any theme include the
     42#: HTML code to be rendered into the page::
    3343#:
    3444#:   from waeup.kofa.browser.resources import favicon
     
    3747#:     # ...
    3848#:     def getResources(self):
    39 #:       favicon.need()
    40 #:       return [...]
    41 
    42 def render_ico(url):
    43     return '<link rel="shortcut icon" type="image/x-icon" href="%s" />' % url
    44 inclusion_renderers['.ico'] = render_ico
    45 EXTENSIONS.append('.ico')
    46 
     49#:       return [favicon, ...]
     50#:
    4751favicon = ResourceInclusion(waeup_kofa, 'favicon.ico')
     52
    4853
    4954#: A resource that binds a jQueryUI datepicker widget to each
Note: See TracChangeset for help on using the changeset viewer.