User Views

User Views

Users Views User.py >Views.py #users/views.py from flask import render_template,url_for,flash,redirect,request,Blueprint from flask_login import login_user, current_user, logout_user, login_required from soical_friendly_blog import db from werkzeug.security import...
Adding user Form

Adding user Form

Adding User forms pip install Flask-WTF Pip install Pillow(for profile image) users >forms.py – # Form Based Imports from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import...
Model database setting

Model database setting

Adding models and creating database Pip install Flask-SQLALchemy Pip install Flask-migrate pip install flask-login pip install Werkzeug Login Manager (The most important part of an application that uses Flask-Login is the login manager class. You should create one for...
Errors handler page

Errors handler page

Errors handler pages (folder)Error pages > handlers.py (create file) Handlers.py – from flask import Blueprint ,render_template error_pages = Blueprint('error_pages',__name__) @error_pages.app_errorhandler(404) def error_404(error): return...
Flask Database and Migrate

Flask Database and Migrate

Setting up the database Create our models Create our database SQLite: First, go to the https://www.sqlite.org website. open the download page https://www.sqlite.org/download.html. After download set the path “sqlite” :- open system properties>environment...
Frontend & Backend

Frontend & Backend

Build your Frontend and Backend Building your frontend Backend Programming language – Python,Java, C, C++ etc Database – mysql, sqlite, mongodb Framework – flask, django, spring Frontend Structure(html) Appearance(css) Interactivity (java scripts)...
Open chat