Fix wrong attribute name for HTTP response status code
[cascardo/ipsilon.git] / ipsilon / root.py
index 6326436..d701616 100644 (file)
@@ -1,19 +1,4 @@
-# Copyright (C) 2013  Simo Sorce <simo@redhat.com>
-#
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# Copyright (C) 2013 Ipsilon project Contributors, for license see COPYING
 
 from ipsilon.util.page import Page
 from ipsilon.util import errors
@@ -66,5 +51,11 @@ class Root(Page):
 
     def root(self):
         self.debug(self.html_heads)
+        providers = []
+        for plugin in self._site['provider_config'].enabled:
+            # pylint: disable=no-member,protected-access
+            obj = self.admin.providers._get_plugin_obj(plugin)
+            providers.extend(obj.get_providers())
+        providers = sorted(providers, key=lambda provider: provider.name)
         return self._template('index.html', title='Ipsilon',
-                              heads=self.html_heads)
+                              providers=providers, heads=self.html_heads)