Mercurial > summit-idp
changeset 64:dbddb0083637
changed send_email() stub to concur w/ readme.
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Tue, 29 Jun 2010 14:53:01 -0700 |
parents | 5cf375ec179e |
children | 707345220707 |
files | server.py |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/server.py Tue Jun 29 14:42:08 2010 -0700 +++ b/server.py Tue Jun 29 14:53:01 2010 -0700 @@ -6,10 +6,15 @@ from summitidp.static_file_serving import StaticFileApp from summitidp.easy import make_wsgi_app -def send_email(email, token): - print "Please send %s an email with the token %s." % (email, token) +def run_server(mydir, send_email=None, host='', port=8000): + if send_email is None: + nicehost = host or '127.0.0.1' + def console_send_email(email, token): + print ("Please visit the url\n\nhttp://%s:%d#verify=%s\n\nto " + "validate the email address %s." % (nicehost, port, + token, email)) + send_email = console_send_email -def run_server(mydir, send_email=send_email, host='', port=8000): api_app = make_wsgi_app(os.path.join(mydir, 'storage'), send_email) static_files_dir = os.path.join(mydir, 'static-files')