admin.py
Go to the documentation of this file.
00001 #! /usr/bin/env python
00002 
00003 """
00004 usage: %(progname)s [args]
00005 """
00006 
00007 import nstart
00008 
00009 import os, sys, string, time, getopt, re
00010 
00011 import neo_cgi, neo_util, neo_cs
00012 
00013 from pyclearsilver import CSPage
00014 from pyclearsilver import odb
00015 
00016 import MBPage
00017 import db_webui
00018 
00019 import roslib
00020 import roslib.scriptutil
00021 #import rospy
00022 import webutil
00023 
00024 class MyPage(MBPage.MBPage):
00025   def setup(self, hdf):
00026     self.db = db_webui.initSchema()
00027     
00028   def display(self, hdf):
00029     webutil.set_tabs(hdf, ["admin"])
00030     if self.userRec.role != "admin":
00031       hdf.setValue("Content", "not_admin.cs")
00032 
00033 def run(context):
00034   return MyPage(context, pagename="admin", nologin=False)
00035 
00036 def main():
00037   context = CSPage.Context()
00038   run(context).start()
00039 
00040 if __name__ == "__main__":
00041   main()


webui
Author(s): Scott Hassan/hassan@willowgarage.com
autogenerated on Wed Apr 23 2014 10:36:00