Changeset 2511

Show
Ignore:
Timestamp:
01/29/10 08:03:18 (7 weeks ago)
Author:
JensDiemer
Message:

We check double extrahead entries, but only the whole block. This doesn't work good. We should check the real link path of every JS/CSS file here. See also:  http://trac.pylucid.net/ticket/338

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.9/pylucid_project/apps/pylucid/defaulttags/extraheadBlock.py

    r2037 r2511  
    3232    def __init__(self, nodelist): 
    3333        self.nodelist = nodelist 
    34          
     34 
    3535    def render(self, context): 
    3636        """ put head data into pylucid_plugin.head_files.context_middleware """ 
     
    4040        except KeyError: 
    4141            raise RuntimeError("Plugin must use RequestContext() or request.PYLUCID.context !") 
    42           
     42 
    4343        extrahead = request.PYLUCID.extrahead 
    44         extrahead.append(output) 
     44        # FIXME: We check double extrahead entries, but only the whole block. This doesn't work good. 
     45        #        We should check the real link path of every JS/CSS file here. 
     46        # See also: http://trac.pylucid.net/ticket/338 
     47        if output not in extrahead: 
     48            extrahead.append(output) 
     49#            request.page_msg("Insert extrahead:", output) 
     50#        else: 
     51#            request.page_msg("Skip extrahead:", output) 
    4552        return u""