Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. @app.route("/Half1Tab")
  2. def Half1Tab():
  3. return """<html>
  4. <head>
  5. <style>
  6. body {
  7. background-color: lightblue;
  8. }
  9. </style>
  10. </head>
  11. <body>
  12. <p style="font-size: 300%;line-height:13px;color:#140cf0;">Input your "Email"</p>
  13. <br />
  14. <form action="/Half1File" method="post">
  15. <input style="font-size:50px;"name="Name"; type="text"/>
  16. <br />
  17. <br />
  18. <br />
  19. <br />
  20. <input type="submit" value="Submit" style="font-size: 300%;height: 100px; width: 300px; left: 250; top: 250;">
  21. </form>
  22. </body>
  23. </html>"""
  24.  
  25. @app.route('/Half1File', methods=['POST'])
  26. def Half1File():
  27. print(request.form)
  28. print(request.form['Name'])
  29. Name = request.form['Name']
  30. Email = Name.split(@)
  31. Email = Email[1]
  32. if Email == "{yourschoolemail}.com":
  33. return """<html>
  34. <meta http-equiv="refresh" content="1; url=/{LoggedInLandingPage}" />
  35. </html>"""
  36. else:
  37. return """<html>
  38. <meta http-equiv="refresh" content="1; url=/{FailedLandingPage}" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement