Python Forum

Full Version: html error 404
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am getting the html error 404 and I don'y know why. I set it up as follows -
    |   |
    |   |
    |   |
    |   |--a css file and directory full of pictures
    |    |--A ton of html templates
    |   |
    |   |
    |   |
Here is the code for
from flaskblog import create_app

app = create_app()

if __name__ == '__main__':
The code for flaskblog.__init__
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_bcrypt import Bcrypt as bc
from flask_login import LoginManager
from flask_mail import Mail
import os

db = SQLAlchemy()
bc = bc()
login_manager = LoginManager()
login_manager.login_view = 'users.login'
login_manager.login_message_category = 'info'
mail = Mail()

def create_app():
    app = Flask(__name__)

    SECRET_KEY = os.environ.get('SECRET_KEY')
    MAIL_SERVER = ''
    MAIL_PORT = 587
    MAIL_USE_TLS = True
    MAIL_USERNAME = os.environ.get('EMAIL_USER')
    MAIL_PASSWORD = os.environ.get('EMAIL_PASS')


    from flaskblog import main
    from flaskblog import users
    from flaskblog import post


    return app
In the main, users, and post folders, each of their __init__ functions has a function call add_routes which take the parameter app. The function creates a blueprint, creates routes with the blueprint, and then registers it at the end of the code. the forms are just forms for filling out specific things. and utils has send_mail and save_picture in it. models contains the User and Post class, children to db.Model. Thanks in advance for your help.
You should try your sample with a different email provider
because google has a lot of securities like catchas
which you have solve from time to time.
And google has his own interpretation of smtp, pop3 and imap.