Flask-Blog-Tutorial
Flask-Blog-Tutorial copied to clipboard
A blog application in python using Flask.
I am getting this error in tutorial 2 and I am unable to create the database to store the user sign-up info from flask_sqlalchemy import SQLAlchemy from .extension import SQLAlchemy...
App 2146154 output: /opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/wsgi-loader.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses App 2146154 output: import sys, os, re, imp, threading,...
Fixes #2
There is a warning when running and restarting the server. Warning: ```python C:\Users\username_that_i_am_not_disclosing\Cloned GIT Stuff\Flask-Blog-Tutorial\venv\lib\site- packages\flask_sqlalchemy\__init__.py:873: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future....
Adding these two lines of code to the else statement in `views.py`'s `delete_post()` function solves this issue(#6): ```diff def delete_post(id): post = Post.query.filter_by(id=id).first() if not post: flash('Post not found', category='error')...
Hi Tim! The default argument of the column date should be a function, not the function response. You wrote: "default=func.now()" But you should write: "default=func.now" (pass the function as an...
Hi, I am having an error while running your final tutorial 5 while signing or login in, it looks like it can't create or identify any database! Can you please...
from flask import Blueprint, render_template from flask_login import login_required, current_user views = Blueprint("views", __name__) @views.route("/") def base(): return render_template("base.html", name="guest") @views.route("/home") def home(): return render_template("home.html", name=current_user.username)
Hallo Tim, corrected for the code in the file views.py line 42 in the tutorial, elif current_user.id != post.id: --> elif current_user.id != post.author: CMIIW.