errors['verify_error'] = "" errors['email_error'] = "" if not USER_RE.match(username): errors['username_error'] = "invalid username. try just letters and numbers" return False if not PASS_RE.match(password): errors['password_error'] = "invalid password." return False if password != verify: errors['verify_error'] = "password must match" return False if email != "": if not EMAIL_RE.match(email): errors['email_error'] = "invalid email address" return False return True connection = DB("mongodb://*****:*****@ds037395.mongolab.com:37395/mongodbcourse", "mongodbcourse", "users") collection = connection.get_collection() users = userDAO.UserDAO(connection.get_data_base()) sessions = sessionDAO.SessionDAO(connection.get_data_base()) bottle.debug(True) bottle.run(host='localhost', port=8082) # Start the webserver running and wait for requests