summaryrefslogtreecommitdiffstats
path: root/silpa/www/index.py
diff options
context:
space:
mode:
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-03-26 22:14:43 +0530
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>2009-03-26 22:14:43 +0530
commit02d0626ee9a64e4393db1e311f355ac5e0b041f5 (patch)
tree870e697bf5cfe77ee0812d3635d10be553080f15 /silpa/www/index.py
parent8ce8904c7366944801f426af20dec665a2f410cf (diff)
downloadRachana.git-02d0626ee9a64e4393db1e311f355ac5e0b041f5.tar.gz
Rachana.git-02d0626ee9a64e4393db1e311f355ac5e0b041f5.tar.xz
Rachana.git-02d0626ee9a64e4393db1e311f355ac5e0b041f5.zip
changes fir plugin architecture
Diffstat (limited to 'silpa/www/index.py')
-rw-r--r--silpa/www/index.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/silpa/www/index.py b/silpa/www/index.py
new file mode 100644
index 0000000..edf0582
--- /dev/null
+++ b/silpa/www/index.py
@@ -0,0 +1,33 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from common import *
+from utils import *
+import traceback
+import cgitb
+import cgi
+cgitb.enable()
+def index(form):
+ if(form.has_key('action')):
+ action=form['action'].value
+ else:
+ action=None
+ response=SilpaResponse()
+ if(action):
+ module_manager=ModuleManager()
+ module_instance = module_manager.getModuleInstance(action)
+ if(module_instance):
+ response.setBreadcrumb(module_instance.get_module_name())
+ response.setContent(module_instance.process(form))
+ response.setErrorMessage(module_instance.get_errormessage())
+ response.setSuccessMessage(module_instance.get_successmessage())
+ else:
+ response.setBreadcrumb("Coming Soon")
+ response.setErrorMessage("Module not available")
+ response.setContent(None)
+ response.setSuccessMessage(None)
+ return response.toString();
+
+if __name__ == '__main__':
+ print "Content-Type: text/html\n\n"
+ print index(cgi.FieldStorage()).encode('utf-8')