-
-
Save kwikiel/e780cdfe07626fe87869 to your computer and use it in GitHub Desktop.
This file contains 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
from bottle import get, post, request, run | |
from test2 import lovechart | |
@get('/login') # or @route('/login') | |
def login(): | |
return ''' | |
<form action="/login" method="post"> | |
Username: <input name="username" type="text" /> | |
Password: <input name="password" type="password" /> | |
<input value="Login" type="submit" /> | |
</form> | |
''' | |
@post('/login') # or @route('/login', method='POST') | |
def do_login(): | |
username = request.forms.get('username') | |
password = request.forms.get('password') | |
if True: | |
return "<img src=http://bitatm.io/" +lovechart(username,password) + ">" | |
run(host='0.0.0.0', port=7070, debug=True) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment