about.py 605 Bytes
Newer Older
Jean Michel Rouly's avatar
Jean Michel Rouly committed
1
2
3
4
5
6
7
8
9
import ldap
import site

site.addsitedir('/srv/http/go/wsgi')
import library
import goconfig

def application(environ, start_response):

10
11
12
  user_logged_in = library.user_logged_in( environ )
  top = library.get_top( user_logged_in )
  bottom = library.get_bottom( user_logged_in )
Jean Michel Rouly's avatar
Jean Michel Rouly committed
13

14
  f = open(goconfig.doc_root + "/static/about.part", "r")
Jean Michel Rouly's avatar
Jean Michel Rouly committed
15
  about = f.read()
Jean Michel Rouly's avatar
Jean Michel Rouly committed
16
17
  f.close()

Jean Michel Rouly's avatar
Jean Michel Rouly committed
18
  response = top + about + bottom
Jean Michel Rouly's avatar
Jean Michel Rouly committed
19
20
21
22
23
24
25

  status = '200 OK'
  response_headers = [('Content-type', 'text/html'),
                      ('Content-Length', str(len(response)))]
  start_response(status, response_headers)

  return [response]