__init__ needs to be in the main package
[cascardo/ipsilon.git] / ipsilon / root.py
old mode 100755 (executable)
new mode 100644 (file)
index 0046ddf..261cdb1
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-#
 # Copyright (C) 2013  Simo Sorce <simo@redhat.com>
 #
 # see file 'COPYING' for use and warranty information
 # Copyright (C) 2013  Simo Sorce <simo@redhat.com>
 #
 # see file 'COPYING' for use and warranty information
@@ -39,10 +37,12 @@ class Root(Page):
         if template_env:
             sites[site]['template_env'] = template_env
         super(Root, self).__init__(sites[site])
         if template_env:
             sites[site]['template_env'] = template_env
         super(Root, self).__init__(sites[site])
+        self.html_heads = dict()
 
         # set up error pages
         cherrypy.config['error_page.400'] = errors.Error_400(self._site)
         cherrypy.config['error_page.401'] = errors.Error_401(self._site)
 
         # set up error pages
         cherrypy.config['error_page.400'] = errors.Error_400(self._site)
         cherrypy.config['error_page.401'] = errors.Error_401(self._site)
+        cherrypy.config['error_page.404'] = errors.Error_404(self._site)
         cherrypy.config['error_page.500'] = errors.Errors(self._site)
 
         # now set up the default login plugins
         cherrypy.config['error_page.500'] = errors.Errors(self._site)
 
         # now set up the default login plugins
@@ -59,4 +59,6 @@ class Root(Page):
         ProviderPlugins(self._site, self.admin)
 
     def root(self):
         ProviderPlugins(self._site, self.admin)
 
     def root(self):
-        return self._template('index.html', title='Ipsilon')
+        self.debug(self.html_heads)
+        return self._template('index.html', title='Ipsilon',
+                              heads=self.html_heads)