Created
July 20, 2020 18:19
-
-
Save farooqkz/7a15f174e63852fdcca03431ee167a2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cherrypy | |
class Hello: | |
@cherrypy.expose | |
def index(self, key=""): | |
if key == "": | |
return "Hello. Please enter key. [Some form here with textbox and submit button and perhaps some fancy features...]" | |
elif key == "THE SECRET KEY": | |
return "Hello you have entered the right key!" | |
else: | |
return "Sorry the key you have entered is WRONG." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment