def about():
 _custom_view('about')
 if settings.has_module('cms'):
  ADMIN = (auth.get_system_roles().ADMIN in session.s3.roles)
  table = s3db.cms_post
  ltable = s3db.cms_post_module
  module = 'default'
  resource = 'about'
  query = ((((ltable.module == module) & ((ltable.resource == None) | (ltable.resource == resource))) & (ltable.post_id == table.id)) & (table.deleted != True))
  item = db(query).select(table.id, table.body, limitby=(0, 1)).first()
  get_vars = {'module': module, 'resource': resource}
  if item:
   from s3 import S3XMLContents
   contents = S3XMLContents(item.body)
   if ADMIN:
    item = DIV(contents, BR(), A(T('Edit'), _href=URL(c='cms', f='post', args=[item.id, 'update'], vars=get_vars), _class='action-btn'))
   else:
    item = DIV(contents)
  elif ADMIN:
   if (s3.crud.formstyle == 'bootstrap'):
    _class = 'btn'
   else:
    _class = 'action-btn'
   item = A(T('Edit'), _href=URL(c='cms', f='post', args='create', vars=get_vars), _class=('%s cms-edit' % _class))
  else:
   item = H2(T('About'))
 else:
  item = H2(T('About'))
 response.title = T('About')
 if ((not settings.get_security_version_info()) or (settings.get_security_version_info_requires_login() and (not auth.s3_logged_in()))):
  return dict(details='', item=item)
 import platform
 import string
 import subprocess
 sahana_version = open(os.path.join(request.folder, 'VERSION'), 'r').read()
 web2py_version = open(apath('../VERSION'), 'r').read()[8:]
 python_version = platform.python_version()
 os_version = platform.platform()
 if (db_string.find('sqlite') != (-1)):
  try:
   import sqlite3
   sqlite_version = sqlite3.version
  except:
   sqlite_version = T('Unknown')
  database = TR(TD('SQLite'), TD(sqlite_version))
 elif (db_string.find('mysql') != (-1)):
  try:
   import MySQLdb
   mysqldb_version = MySQLdb.__revision__
  except:
   mysqldb_version = T('Not installed or incorrectly configured.')
   mysql_version = T('Unknown')
  else:
   con = MySQLdb.connect(host=settings.database.get('host', 'localhost'), port=(settings.database.get('port', None) or 3306), db=settings.database.get('database', 'sahana'), user=settings.database.get('username', 'sahana'), passwd=settings.database.get('password', 'password'))
   cur = con.cursor()
   cur.execute('SELECT VERSION()')
   mysql_version = cur.fetchone()
  database = TAG[''](TR(TD('MySQL'), TD(mysql_version)), TR(TD('MySQLdb python driver'), TD(mysqldb_version)))
 else:
  try:
   import psycopg2
   psycopg_version = psycopg2.__version__
  except:
   psycopg_version = T('Not installed or incorrectly configured.')
   pgsql_version = T('Unknown')
  else:
   con = psycopg2.connect(host=settings.database.get('host', 'localhost'), port=(settings.database.get('port', None) or 5432), database=settings.database.get('database', 'sahana'), user=settings.database.get('username', 'sahana'), password=settings.database.get('password', 'password'))
   cur = con.cursor()
   cur.execute('SELECT version()')
   pgsql_version = cur.fetchone()
  database = TAG[''](TR(TD('PostgreSQL'), TD(pgsql_version)), TR(TD('psycopg2 python driver'), TD(psycopg_version)))
 try:
  from lxml import etree
  lxml_version = '.'.join([str(i) for i in etree.LXML_VERSION])
 except:
  lxml_version = T('Not installed or incorrectly configured.')
 try:
  import reportlab
  reportlab_version = reportlab.Version
 except:
  reportlab_version = T('Not installed or incorrectly configured.')
 try:
  import shapely
  shapely_version = shapely.__version__
 except:
  shapely_version = T('Not installed or incorrectly configured.')
 try:
  import xlrd
  xlrd_version = xlrd.__VERSION__
 except:
  xlrd_version = T('Not installed or incorrectly configured.')
 try:
  import xlwt
  xlwt_version = xlwt.__VERSION__
 except:
  xlwt_version = T('Not installed or incorrectly configured.')
 details = DIV(TABLE(THEAD(), TBODY(TR(TD(STRONG(T('Configuration'))), TD(), _class='odd'), TR(TD(T('Public URL')), TD(settings.get_base_public_url())), TR(TD(STRONG(T('Core Components'))), TD(STRONG(T('Version'))), _class='odd'), TR(TD(settings.get_system_name_short()), TD(sahana_version)), TR(TD(T('Web Server')), TD(request.env.server_software), _class='odd'), TR(TD('Web2Py'), TD(web2py_version)), TR(TD('Python'), TD(python_version), _class='odd'), TR(TD('Operating System'), TD(os_version)), TR(TD(STRONG(T('Database'))), TD(), _class='odd'), database, TR(TD(STRONG(T('Other Components'))), TD(), _class='odd'), TR(TD('lxml'), TD(lxml_version)), TR(TD('ReportLab'), TD(reportlab_version), _class='odd'), TR(TD('Shapely'), TD(shapely_version)), TR(TD('xlrd'), TD(xlrd_version), _class='odd'), TR(TD('xlwt'), TD(xlwt_version)), _class='dataTable display'), _class='table-container'))
 response.title = T('About')
 return dict(details=details, item=item)

def about ( ) : _custom_view ( 'about' ) if settings . has_module ( 'cms' ) : ADMIN = ( auth . get_system_roles ( ) . ADMIN in session . s3 . roles ) table = s3db . cms_post ltable = s3db . cms_post_module module = 'default' resource = 'about' query = ( ( ( ( ltable . module == module ) & ( ( ltable . resource == None ) | ( ltable . resource == resource ) ) ) & ( ltable . post_id == table . id ) ) & ( table . deleted != True ) ) item = db ( query ) . select ( table . id , table . body , limitby = ( 0 , 1 ) ) . first ( ) get_vars = { 'module' : module , 'resource' : resource } if item : from s3 import S3XMLContents contents = S3XMLContents ( item . body ) if ADMIN : item = DIV ( contents , BR ( ) , A ( T ( 'Edit' ) , _href = URL ( c = 'cms' , f = 'post' , args = [ item . id , 'update' ] , vars = get_vars ) , _class = 'action-btn' ) ) else : item = DIV ( contents ) elif ADMIN : if ( s3 . crud . formstyle == 'bootstrap' ) : _class = 'btn' else : _class = 'action-btn' item = A ( T ( 'Edit' ) , _href = URL ( c = 'cms' , f = 'post' , args = 'create' , vars = get_vars ) , _class = ( '%s cms-edit' % _class ) ) else : item = H2 ( T ( 'About' ) ) else : item = H2 ( T ( 'About' ) ) response . title = T ( 'About' ) if ( ( not settings . get_security_version_info ( ) ) or ( settings . get_security_version_info_requires_login ( ) and ( not auth . s3_logged_in ( ) ) ) ) : return dict ( details = '' , item = item ) import platform import string import subprocess sahana_version = open ( os . path . join ( request . folder , 'VERSION' ) , 'r' ) . read ( ) web2py_version = open ( apath ( '../VERSION' ) , 'r' ) . read ( ) [ 8 : ] python_version = platform . python_version ( ) os_version = platform . platform ( ) if ( db_string . find ( 'sqlite' ) != ( - 1 ) ) : try : import sqlite3 sqlite_version = sqlite3 . version except : sqlite_version = T ( 'Unknown' ) database = TR ( TD ( 'SQLite' ) , TD ( sqlite_version ) ) elif ( db_string . find ( 'mysql' ) != ( - 1 ) ) : try : import MySQLdb mysqldb_version = MySQLdb . __revision__ except : mysqldb_version = T ( 'Not installed or incorrectly configured.' ) mysql_version = T ( 'Unknown' ) else : con = MySQLdb . connect ( host = settings . database . get ( 'host' , 'localhost' ) , port = ( settings . database . get ( 'port' , None ) or 3306 ) , db = settings . database . get ( 'database' , 'sahana' ) , user = settings . database . get ( 'username' , 'sahana' ) , passwd = settings . database . get ( 'password' , 'password' ) ) cur = con . cursor ( ) cur . execute ( 'SELECT VERSION()' ) mysql_version = cur . fetchone ( ) database = TAG [ '' ] ( TR ( TD ( 'MySQL' ) , TD ( mysql_version ) ) , TR ( TD ( 'MySQLdb python driver' ) , TD ( mysqldb_version ) ) ) else : try : import psycopg2 psycopg_version = psycopg2 . __version__ except : psycopg_version = T ( 'Not installed or incorrectly configured.' ) pgsql_version = T ( 'Unknown' ) else : con = psycopg2 . connect ( host = settings . database . get ( 'host' , 'localhost' ) , port = ( settings . database . get ( 'port' , None ) or 5432 ) , database = settings . database . get ( 'database' , 'sahana' ) , user = settings . database . get ( 'username' , 'sahana' ) , password = settings . database . get ( 'password' , 'password' ) ) cur = con . cursor ( ) cur . execute ( 'SELECT version()' ) pgsql_version = cur . fetchone ( ) database = TAG [ '' ] ( TR ( TD ( 'PostgreSQL' ) , TD ( pgsql_version ) ) , TR ( TD ( 'psycopg2 python driver' ) , TD ( psycopg_version ) ) ) try : from lxml import etree lxml_version = '.' . join ( [ str ( i ) for i in etree . LXML_VERSION ] ) except : lxml_version = T ( 'Not installed or incorrectly configured.' ) try : import reportlab reportlab_version = reportlab . Version except : reportlab_version = T ( 'Not installed or incorrectly configured.' ) try : import shapely shapely_version = shapely . __version__ except : shapely_version = T ( 'Not installed or incorrectly configured.' ) try : import xlrd xlrd_version = xlrd . __VERSION__ except : xlrd_version = T ( 'Not installed or incorrectly configured.' ) try : import xlwt xlwt_version = xlwt . __VERSION__ except : xlwt_version = T ( 'Not installed or incorrectly configured.' ) details = DIV ( TABLE ( THEAD ( ) , TBODY ( TR ( TD ( STRONG ( T ( 'Configuration' ) ) ) , TD ( ) , _class = 'odd' ) , TR ( TD ( T ( 'Public URL' ) ) , TD ( settings . get_base_public_url ( ) ) ) , TR ( TD ( STRONG ( T ( 'Core Components' ) ) ) , TD ( STRONG ( T ( 'Version' ) ) ) , _class = 'odd' ) , TR ( TD ( settings . get_system_name_short ( ) ) , TD ( sahana_version ) ) , TR ( TD ( T ( 'Web Server' ) ) , TD ( request . env . server_software ) , _class = 'odd' ) , TR ( TD ( 'Web2Py' ) , TD ( web2py_version ) ) , TR ( TD ( 'Python' ) , TD ( python_version ) , _class = 'odd' ) , TR ( TD ( 'Operating System' ) , TD ( os_version ) ) , TR ( TD ( STRONG ( T ( 'Database' ) ) ) , TD ( ) , _class = 'odd' ) , database , TR ( TD ( STRONG ( T ( 'Other Components' ) ) ) , TD ( ) , _class = 'odd' ) , TR ( TD ( 'lxml' ) , TD ( lxml_version ) ) , TR ( TD ( 'ReportLab' ) , TD ( reportlab_version ) , _class = 'odd' ) , TR ( TD ( 'Shapely' ) , TD ( shapely_version ) ) , TR ( TD ( 'xlrd' ) , TD ( xlrd_version ) , _class = 'odd' ) , TR ( TD ( 'xlwt' ) , TD ( xlwt_version ) ) , _class = 'dataTable display' ) , _class = 'table-container' ) ) response . title = T ( 'About' ) return dict ( details = details , item = item )
shows about page with version information .