...
 
Commits (2)
# Created by .ignore support plugin (hsz.mobi)
### Example user template template
### Example user template
# IntelliJ project files
.idea
*.iml
out
gen
android
......@@ -46,3 +46,5 @@ CMD /usr/sbin/apache2ctl -D FOREGROUND
# docker build -t news-reader .
# docker rm -f news-reader
# docker run -d -e ENV=production -p 7777:80 --name news-reader news-reader
# docker build -t news-reader . ; docker rm -f news-reader ; docker run -d -e ENV=production -p 7777:80 --name news-reader news-reader
\ No newline at end of file
......@@ -8,6 +8,7 @@ app = Flask(__name__)
app.config.from_object(__name__)
app.config['SECRET_KEY'] = '7d441f27d441f27567d441f2b6176a'
class ReusableForm(Form):
url = TextField('Url:', validators=[validators.required()])
......@@ -37,11 +38,21 @@ def save_url():
@app.route("/app", methods=['GET'])
def save_from_app():
if request.args.get("url"):
parse_compu_wo.process_one_url(request.args.get("url"))
return '', 200
else:
return '', 400
if request.args.get("url"):
parse_compu_wo.process_one_url(request.args.get("url"))
return '', 200
else:
return '', 400
@app.route("/test_post", methods=['POST'])
def test_post():
if request.method == 'POST':
for obj in request.form.items():
print(obj)
return '', 200
else:
return '', 400
if __name__ == "__main__":
......