Skip to content

Commit

Permalink
changed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Daria Jung committed Sep 30, 2012
1 parent 28dad8b commit c7c48ab
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 121 deletions.
22 changes: 12 additions & 10 deletions babies.py
Expand Up @@ -4,20 +4,22 @@
import search
app = Flask(__name__)

@app.route('/', methods=['GET', 'POST'])
@app.route('/')
def index():
spermcount = search.searching("Justin Bieber")
return render_template('index.html')
spermcount = search.searching("Justin Bieber")
return render_template('index.html')

app.route('/',methods=['GET','POST'])
@app.route('/search')
def print_form():
if request.method == 'POST':
return render_template('index.html')
print "0hello world!"
if request.method == 'GET':
print render_template('index.html',result=request.form['spermcount'])
return render_template('index.html',result=request.form['spermcount'])
name = request.args.get('spermcount')
print name
print "1hello world!"
print render_template('index.html',result = request.args['spermcount'])
return render_template('index.html',result = request.args['spermcount'])


if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
Binary file modified templates/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/index.html
Expand Up @@ -19,7 +19,7 @@
<br></br>
<img src ="static/logo.png">

<form class="form-wrapper cf">
<form action = "/search" class="form-wrapper cf">
<input name="spermcount" type="text" placeholder="Search for a celeb here..." required>
<button type="submit">have my babies!</button>
</form>
Expand Down
110 changes: 0 additions & 110 deletions templates/index2.html

This file was deleted.

0 comments on commit c7c48ab

Please sign in to comment.