Home/Support/Support Forum/Python Flask Debug Mode not working?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Python Flask Debug Mode not working?

0 votes
I am trying to enable debug mode but it doesn't seem to be working as I am not recieving errors on bad Python[url]requests my code:

from flask import Flask, request, jsonify, render_template, redirect, send_from_directory
import logging
from datetime import datetime
from time import sleep
import webbrowser
import json

app = Flask(__name__)
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)

@app.route('/static/css')
def serve_static(path):
return send_from_directory('static', path)

@app.route('/static/js')
def serve_static_js(path):
return send_from_directory('static', path)

@app.route('/')
def home():
return render_template('index.html')

webbrowser.open('http://aurl.com:5000/')

app.debug = True
app.run()
asked Aug 1, 2018 in Python by bargavi New to the Community (0 points)

Please log in or register to answer this question.

...