Skip to content

Commit 3b202ab

Browse files
authored
Merge branch 'master' into master
2 parents a45cf2d + 6a2dc2a commit 3b202ab

File tree

8 files changed

+26
-16
lines changed

8 files changed

+26
-16
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
click==6.7
22
Flask==1.0.2
33
itsdangerous==0.24
4-
Jinja2==2.10
4+
Jinja2>=2.10.1
55
MarkupSafe==1.0
66
python-dotenv==0.9.1
77
Werkzeug==0.14.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
apistar==0.5.41
1+
apistar>=0.5.41,<0.5.1000
22
pytest
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
from program import app
2+
3+
if __name__ == '__main__':
4+
app.run(load_dotenv=False)
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1-
from flask import render_template, request
2-
from program import app
31
from datetime import datetime
4-
from pprint import pprint
2+
53
import requests
4+
from flask import render_template, request
5+
6+
from program import app
7+
8+
time_now = str(datetime.today())
69

7-
timenow = str(datetime.today())
810

911
@app.route('/')
1012
@app.route('/index')
1113
def index():
12-
return render_template('index.html', title='Template Demo', time=timenow)
14+
return render_template('index.html', title='Template Demo', time=time_now)
15+
1316

1417
@app.route('/100Days')
1518
def p100days():
1619
return render_template('100Days.html')
1720

21+
1822
@app.route('/chuck')
1923
def chuck():
2024
joke = get_chuck_joke()
2125
return render_template('chuck.html',
22-
joke=joke)
26+
joke=joke)
27+
2328

2429
@app.route('/pokemon', methods=['GET', 'POST'])
2530
def pokemon():
@@ -28,19 +33,21 @@ def pokemon():
2833
colour = request.form.get('pokecolour')
2934
pokemon = get_poke_colours(colour)
3035
return render_template('pokemon.html',
31-
pokemon=pokemon)
36+
pokemon=pokemon)
37+
3238

3339
def get_chuck_joke():
3440
r = requests.get('https://api.chucknorris.io/jokes/random')
3541
data = r.json()
3642
return data['value']
3743

44+
3845
def get_poke_colours(colour):
3946
r = requests.get('https://pokeapi.co/api/v2/pokemon-color/' + colour.lower())
4047
pokedata = r.json()
4148
pokemon = []
4249

4350
for i in pokedata['pokemon_species']:
4451
pokemon.append(i['name'])
45-
52+
4653
return pokemon

days/017-020-flask-call-apis/code/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Click==7.0
44
Flask==1.0.2
55
idna==2.7
66
itsdangerous==0.24
7-
Jinja2==2.10
7+
Jinja2>=2.10.1
88
MarkupSafe==1.0
99
python-dotenv==0.9.1
10-
requests==2.19.1
11-
urllib3==1.23
10+
requests>=2.21.0
11+
urllib3==1.24.2
1212
Werkzeug==0.14.1

days/041-044-react/demo/tips/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class App extends Component {
7878
})
7979
}
8080

81-
filterTips = (filterStr) => {
81+
filterTips(filterStr){
8282
let tips = []
8383
for(const tip of this.state.orgTips){
8484
if(tip.tip && tip.tip.toLowerCase().includes(filterStr) ||

days/051-twilio/code/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ pytz==2019.1
77
requests==2.21.0
88
six==1.12.0
99
twilio==6.26.1
10-
urllib3==1.24.1
10+
urllib3==1.24.2

days/065-068-heroku-deployment/code/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Click==7.0
22
Flask==1.0.2
33
gunicorn==19.9.0
44
itsdangerous==1.1.0
5-
Jinja2==2.10
5+
Jinja2>=2.10.1
66
MarkupSafe==1.1.1
77
python-http-client==3.1.0
88
sendgrid==5.6.0

0 commit comments

Comments
 (0)