summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-07-02 16:37:40 +0300
committermakkalot <makkalot@gmail.com>2008-07-02 16:37:40 +0300
commitfdb9d15734dea846801a58c12e74888eade403db (patch)
tree8f81d4e786d4266b8e916e166e9a4f8112e5c6fc /funcweb
parent6f5c641010029972c6e3d3bc574a7ce26d3b0d10 (diff)
downloadfunc-fdb9d15734dea846801a58c12e74888eade403db.tar.gz
func-fdb9d15734dea846801a58c12e74888eade403db.tar.xz
func-fdb9d15734dea846801a58c12e74888eade403db.zip
add some comments into the controller
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/controllers.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/funcweb/funcweb/controllers.py b/funcweb/funcweb/controllers.py
index d19dace..b2748a6 100644
--- a/funcweb/funcweb/controllers.py
+++ b/funcweb/funcweb/controllers.py
@@ -65,8 +65,7 @@ class Root(controllers.RootController):
If only the minion name is given, it will display a list of modules
for that minion. If a module is supplied, it will display a list of
- methods. If a method is supplied, it will display a method execution
- form.
+ methods.
"""
#if we have it in the cache
if self.func_cache['minion_name'] == name:
@@ -137,6 +136,9 @@ class Root(controllers.RootController):
@expose(template="funcweb.templates.method_args")
@identity.require(identity.not_anonymous())
def method_display(self,minion=None,module=None,method=None):
+ """
+ That method generates the input widget for givent method.
+ """
global global_form
if self.func_cache['minion_name'] == minion:
@@ -188,6 +190,9 @@ class Root(controllers.RootController):
@expose(template="funcweb.templates.login")
def login(self, forward_url=None, previous_url=None, *args, **kw):
+ """
+ The login form for not registered users
+ """
from cherrypy import request, response
if not identity.current.anonymous \
and identity.was_login_attempted() \
@@ -233,7 +238,10 @@ class Root(controllers.RootController):
@identity.require(identity.not_anonymous())
def post_form(self,**kw):
"""
- Data processing part
+ Data processing part for methods that accept some inputs.
+ Method recieves the method arguments for minion method then
+ orders them into their original order and sends the xmlrpc
+ request to the minion !
"""
if kw.has_key('minion') and kw.has_key('module') and kw.has_key('method'):
#assign them because we need the rest so dont control everytime
@@ -301,5 +309,8 @@ class Root(controllers.RootController):
@expose()
def logout(self):
+ """
+ The logoout part
+ """
identity.current.logout()
raise redirect("/")