sample-flask-best-practices icon indicating copy to clipboard operation
sample-flask-best-practices copied to clipboard

App is unusable - The index shows 404

Open app-generator opened this issue 3 years ago • 3 comments

How to reproduce:

  • fresh clone
  • install dependencies
  • set up the environment
  • start the app
  • access the app in the browser:

App Console

(env) PS D:\work\repo-samples\sample-flask-best-practices> flask run --port=5003
 * Serving Flask app 'run.py' (lazy loading)
 * Environment: development
 * Debug mode: on
2022-05-27 11:46:47,478 | INFO |  * Running on http://127.0.0.1:5003 (Press CTRL+C to quit)
2022-05-27 11:46:47,481 | INFO |  * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 669-056-847
127.0.0.1 - - [27/May/2022 11:46:58] "GET / HTTP/1.1" 404 -
2022-05-27 11:46:58,848 | INFO | 127.0.0.1 - - [27/May/2022 11:46:58] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [27/May/2022 11:46:58] "GET /favicon.ico HTTP/1.1" 404 -
2022-05-27 11:46:58,956 | INFO | 127.0.0.1 - - [27/May/2022 11:46:58] "GET /favicon.ico HTTP/1.1" 404 -

App Screen

image

app-generator avatar May 27 '22 08:05 app-generator

After registration + login: image

app-generator avatar May 27 '22 10:05 app-generator

@app-generator got this running locally, and I don't see the 400 or 404 issues (aside from a missing favicon.ico).

I did notice the requirements.txt is using a deprecated library validate_email_address, so I updated the reference in app/auth/routes.py to:

from email_validator import validate_email
# from validate_email_address import validate_email 

I attached the requirements.txt for the libs used in this repo so far:

requirements_v2.txt

akcode47 avatar Jul 14 '22 02:07 akcode47

Ty for your work @akcode47 Please add the missing/updated deps to the main requirements file and remove thr v2 version

app-generator avatar Jul 14 '22 04:07 app-generator