[Mpuls-commits] r2842 - in jmd/trunk: . jmdweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon May 31 17:28:42 CEST 2010


Author: bh
Date: 2010-05-31 17:28:41 +0200 (Mon, 31 May 2010)
New Revision: 2842

Modified:
   jmd/trunk/ChangeLog
   jmd/trunk/jmdweb/controllers/jmdstruktur.py
Log:
* jmdweb/controllers/jmdstruktur.py: Fix formatting.


Modified: jmd/trunk/ChangeLog
===================================================================
--- jmd/trunk/ChangeLog	2010-05-31 14:31:46 UTC (rev 2841)
+++ jmd/trunk/ChangeLog	2010-05-31 15:28:41 UTC (rev 2842)
@@ -1,3 +1,7 @@
+2010-05-31  Bernhard Herzog  <bh at intevation.de>
+
+	* jmdweb/controllers/jmdstruktur.py: Fix formatting.
+
 2010-05-28  Bernhard Herzog  <bh at intevation.de>
 
 	* jmdweb/templates/jmdstruktur/new.mako,

Modified: jmd/trunk/jmdweb/controllers/jmdstruktur.py
===================================================================
--- jmd/trunk/jmdweb/controllers/jmdstruktur.py	2010-05-31 14:31:46 UTC (rev 2841)
+++ jmd/trunk/jmdweb/controllers/jmdstruktur.py	2010-05-31 15:28:41 UTC (rev 2842)
@@ -34,14 +34,16 @@
 import formencode
 
 from mpulsweb.model.user import UserListObject
-from mpulsweb.model.agencysettings import Agency 
+from mpulsweb.model.agencysettings import Agency
 from mpulsweb.lib.base import BaseController, c, g, render, request, session, h
 from mpulsweb.lib.security import checkRole
 
 from jmdweb.lib.validators import PermissionForm
 
+
 log = logging.getLogger(__name__)
 
+
 class JmdstrukturController(BaseController):
 
     @checkRole(['cm', 'admin'])
@@ -54,22 +56,22 @@
     @checkRole('admin')
     def permission(self):
         agency = Agency()
-        permission = agency.get_value('jmdstrukur_permission_userid', []).split(',')
-        c.userlist = UserListObject().getUserList() 
-        userlist = UserListObject().getUserList() 
+        permission = agency.get_value('jmdstrukur_permission_userid',
+                                      []).split(',')
+        c.userlist = UserListObject().getUserList()
+        userlist = UserListObject().getUserList()
         defaults = {'userid': permission}
         page = render('jmdstruktur/permission.mako')
-        return formencode.htmlfill.render(page,
-                                          defaults=defaults,
-                                          errors={})
+        return formencode.htmlfill.render(page, defaults=defaults, errors={})
 
     @checkRole('admin')
     def permissionAction(self):
         agency = Agency()
-        validator = PermissionForm() 
-        c.userlist = UserListObject().getUserList() 
+        validator = PermissionForm()
+        c.userlist = UserListObject().getUserList()
         form_resut = validator.to_python(request.params)
-        agency.store({'jmdstrukur_permission_userid': ",".join(form_resut['userid'])})
+        agency.store({'jmdstrukur_permission_userid':
+                      ",".join(form_resut['userid'])})
         c.status_msg = h.status_message("Berechtigung erfolgreich gesetzt.")
         page = render('jmdstruktur/permission.mako')
         return self.permission()
@@ -77,7 +79,6 @@
     @checkRole(['cm', 'admin'])
     def new(self):
         page = render('jmdstruktur/new.mako')
-        return formencode.htmlfill.render(page,
-                                          defaults={},
-                                          errors={})
+        return formencode.htmlfill.render(page, defaults={}, errors={})
+
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list