Skip to content
This repository was archived by the owner on Nov 14, 2020. It is now read-only.

Commit 3d05de3

Browse files
author
Kareem Zidane
authoredNov 8, 2017
Merge pull request #184 from cs50/flask
removes FLASK_DEBUG, adds --reload
2 parents 6add43f + 58588dc commit 3d05de3

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ VERSION_FILE := $(FILES_DIR)/etc/version50
88
PLUGINS := audioplayer browser cat debug gist hex info presentation simple statuspage theme
99

1010
NAME := ide50
11-
VERSION := 123
11+
VERSION := 124
1212

1313
define getplugin
1414
@echo "\nFetching $(1)..."

‎files/etc/profile.d/ide50.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,9 @@ export DEBIAN_FRONTEND=noninteractive
105105

106106
# flask
107107
export FLASK_APP="application.py"
108-
export FLASK_DEBUG="1"
109-
110-
# flask wrapper
111108
alias flask="/home/ubuntu/.cs50/bin/flask"
112109

113-
# http-server wrapper
110+
# http-server
114111
alias http-server="/home/ubuntu/.cs50/bin/http-server"
115112

116113
# language

‎files/home/ubuntu/.cs50/bin/flask

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ if [[ "$1" == "run" ]]; then
1414
# default options
1515
host="--host=0.0.0.0"
1616
port="--port=8080"
17+
reload="--reload"
1718
threads="--with-threads"
1819
options=""
1920

@@ -25,6 +26,8 @@ if [[ "$1" == "run" ]]; then
2526
host="$1"
2627
elif [[ "$1" =~ ^--port= ]]; then
2728
port="$1"
29+
elif [[ "$1" =~ ^--(no-)?reload$ ]]; then
30+
reload="$1"
2831
elif [[ "$1" =~ ^--with(out)?-threads$ ]]; then
2932
threads="$1"
3033
else
@@ -34,7 +37,7 @@ if [[ "$1" == "run" ]]; then
3437
done
3538

3639
# spawn flask
37-
script --flush --quiet --return /dev/null --command "FLASK_APP=\"$FLASK_APP\" FLASK_DEBUG=\"$FLASK_DEBUG\" flask run $host $port $threads $options" |
40+
script --flush --quiet --return /dev/null --command "FLASK_APP=\"$FLASK_APP\" FLASK_DEBUG=\"$FLASK_DEBUG\" flask run $host $port $reload $threads $options" |
3841
while IFS= read -r line
3942
do
4043
# rewrite address as hostname50

‎update50

+6-5
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ unset PYTHONPATH
142142
export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
143143

144144
# install python packages
145-
PYTHON_PACKAGES="check50==2.1.3 \
146-
cs50==2.3.1 \
145+
PYTHON_PACKAGES="check50==2.2.1 \
146+
cs50==2.3.2 \
147147
feedparser \
148148
Flask \
149149
Flask-JSGlue \
@@ -153,14 +153,15 @@ PYTHON_PACKAGES="check50==2.1.3 \
153153
nltk \
154154
passlib \
155155
plotly \
156-
render50==2.1.1 \
156+
render50==2.2.0 \
157157
SQLAlchemy \
158158
style50==2.3.3 \
159-
submit50==2.4.5 \
159+
submit50==2.4.6 \
160160
termcolor \
161161
twython \
162162
virtualenv"
163-
( sudo -H pip3 install $PYTHON_PACKAGES )
163+
164+
sudo -H pip3 install $PYTHON_PACKAGES
164165
/opt/pyenv/bin/pyenv rehash
165166

166167
echo "Installing nltk data..."

0 commit comments

Comments
 (0)