- #################### requirements/prelude management
- def _init_prelude (self, request):
- if not hasattr (request, 'plugin_prelude'):
- # include css/plugins.css
- request.plugin_prelude=Prelude(css_files='css/plugin.css')
-
- def inspect_request (self, request, message):
- has=hasattr(request,'plugin_prelude')
- get=getattr(request,'plugin_prelude','none-defined')
- print "INSPECT (%s), hasattr %s, getattr %s"%(message,has,get)
-
- # can be used directly in render_content()
- def add_js_files (self, request, files):
- self._init_prelude (request)
- request.plugin_prelude.add_js_files (files)
- def add_css_files (self, request, files):
- self._init_prelude (request)
- request.plugin_prelude.add_css_files (files)
- def add_js_chunks (self, request, chunks):
- self._init_prelude (request)
- request.plugin_prelude.add_js_chunks (chunks)
- def add_css_chunks (self, request, chunks):
- self._init_prelude (request)
- request.plugin_prelude.add_css_chunks (chunks)
-