(Aug-13-2019, 11:14 PM)Truman Wrote: I guess I'll have to clone the whole code_snippets repository.I told in in post #2 about DownGit or cooler GitZip where can download individual files and folder.
Quote:After cloning to my project folder starting run.py and trying to open a web site leads to this errorYou most link to what where you are,should not be necessary to mention this
Link if i test eg
08-Posts
.Here a run,i delete database
site.db
so i can make new one.G:\all_flask\08-Posts λ ls flaskblog/ run.py # Make database site.db G:\all_flask\08-Posts λ ptpython >>> from flaskblog import db >>> db.create_all() >>> exit()Add line 2:
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://site.db' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = FalseTest run:
G:\all_flask\08-Posts λ python run.py * Serving Flask app "flaskblog" (lazy loading) * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: on * Restarting with stat * Debugger is active! * Debugger PIN: 334-187-997 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) 127.0.0.1 - - [14/Aug/2019 16:19:21] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [14/Aug/2019 16:19:21] "GET /static/main.css HTTP/1.1" 200 - 127.0.0.1 - - [14/Aug/2019 16:19:21] "GET /favicon.ico HTTP/1.1" 404 - 127.0.0.1 - - [14/Aug/2019 16:20:09] "GET /about HTTP/1.1" 200 - 127.0.0.1 - - [14/Aug/2019 16:20:10] "GET /home HTTP/1.1" 200 - 127.0.0.1 - - [14/Aug/2019 16:20:13] "GET /register HTTP/1.1" 200 - 127.0.0.1 - - [14/Aug/2019 16:20:28] "POST /register HTTP/1.1" 302 - 127.0.0.1 - - [14/Aug/2019 16:20:28] "GET /login HTTP/1.1" 200 - 127.0.0.1 - - [14/Aug/2019 16:20:32] "GET /login HTTP/1.1" 200 -No error site work and i can register a new user,and
New Post
message get added to database.