Commit 0237cd61 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Added application page.

parent 7384b89b
import ldap
import site
import library
import goconfig
def application(environ, start_response):
# Construct the default body, along with its header/footer wrapper.
body = []
f = open(goconfig.doc_root + "/site_data/top.part", "r")
top_part =
f = open(goconfig.doc_root + "/site_data/bottom.part", "r")
bottom_part =
apply_form = """
<form action="" method="post">
<p>This form allows you to apply for registered access to the George
Mason Student-Run Computing and Technology's Go URL shortening
service. Access to this computing resource is governed by the <a
href="">SRCT Usage Policy</a>.
Submitting an application indicates implicit acceptance of these
terms. Misuse of this service will be handled strictly.</p>
<br />
<label for="usr">username</label>
<br /><br />
<input type="text" id="usr" name="usr" value="" />
<br /><br />
<label for="pass">password</label>
<br /><br />
<input type="password" id="pass" name="pass" value="" />
<br /><br />
<input type="submit" name="submit" value="LOGIN" />
<br /><br />
body.append( apply_form )
body = ''.join( body )
response = top_part + body + bottom_part
status = '200 OK'
response_headers = [('Content-type', 'text/html'),
('Content-Length', str(len(response)))]
start_response(status, response_headers)
return [response]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment