[Mpuls-commits] r1460 - wasko/branches/2.0/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 10 15:21:09 CET 2010


Author: torsten
Date: 2010-02-10 15:21:09 +0100 (Wed, 10 Feb 2010)
New Revision: 1460

Modified:
   wasko/branches/2.0/mpulsweb/controllers/mpuls.py
Log:
* mpulsweb/controllers/mpuls.py (get_newslist): Copied from mpulsbase. 
* mpulsweb/controllers/mpuls.py (MpulsController.index): Load news if
enabled.


Modified: wasko/branches/2.0/mpulsweb/controllers/mpuls.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/mpuls.py	2010-02-10 14:14:16 UTC (rev 1459)
+++ wasko/branches/2.0/mpulsweb/controllers/mpuls.py	2010-02-10 14:21:09 UTC (rev 1460)
@@ -3,11 +3,21 @@
 from pylons import request, response, session, tmpl_context as c
 from pylons.controllers.util import abort, redirect_to
 
+from mpulsweb.model.news import NewsList
 from mpulsweb.lib.base import BaseController, render
 
 log = logging.getLogger(__name__)
 
+def get_newslist(user):
+    return NewsList(user)
+
 class MpulsController(BaseController):
 
     def index(self):
+
+        # LOAD NEWS
+        if g.mpuls_config.is_enabled('module', 'news'):
+            log.debug('Loading news list')
+            c.news = get_newslist(user)
+
         return render('/home/home.mako')



More information about the Mpuls-commits mailing list