Skip to content

Instantly share code, notes, and snippets.

@farooqkz
Created July 20, 2020 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farooqkz/7a15f174e63852fdcca03431ee167a2d to your computer and use it in GitHub Desktop.
Save farooqkz/7a15f174e63852fdcca03431ee167a2d to your computer and use it in GitHub Desktop.
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