IsaacLehman / Full-Flask-Web-App

A full feature Flask application with login, dashboard, custom admin, flask sql alchamy ORM, complete db, setup and run scripts, and macros

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run

Below is the setup.sh script. Run with bash setup.sh.

# ==============================================================================
# RUN WITH: bash setup.sh
# - Installs Flask, and Flask SQL Alchemy
# - Creates SQLITE3 Database
# - Inserts Dummy Data
#
# BY: Isaac Lehman
# ==============================================================================
# CREATE VIRTUAL ENVIROMENT
python3 -m venv FlaskApp
source FlaskApp/bin/activate
cd FlaskApp
echo "=============================================================================="
echo "Virtual enviroment created"
# CLONE THE REPO
git clone https://github.com/IsaacLehman/Full-Flask-Web-App.git
cd Full-Flask-Web-App
echo "=============================================================================="
echo "Repository cloned"
# SETUP
pip3 -q install flask werkzeug flask_monitoringdashboard flask-sqlalchemy flask-admin markdown gunicorn pygments
echo "=============================================================================="
echo "PIP installs finished Succesfully!"
# CREATE DB
python3 -c 'from server import db, add_user, generate_password_hash;db.create_all();add_user("test@example.com", "admin", generate_password_hash("admin", "sha256"), privilege="ADMIN")'
echo "=============================================================================="
echo "DB Created Succesfully!"
echo "u: admin"
echo "p: admin"
echo "=============================================================================="
echo "Starting server..."
echo "=============================================================================="
python3 server.py

Files

Base blocks:

  • title

  • header_preload

  • header_scripts

  • header_css

  • nav_content

  • header_content

  • side_bar_content

  • main_content

  • footer_content

  • footer_scripts

  • footer_css

Use macros with: {% from "includes/macros.html" import nav_link with context %}

Parts:

  • parts/nav.html
  • parts/flash-msg.html
  • parts/master.html

About

A full feature Flask application with login, dashboard, custom admin, flask sql alchamy ORM, complete db, setup and run scripts, and macros


Languages

Language:HTML 48.1%Language:Python 24.6%Language:CSS 16.8%Language:JavaScript 9.7%Language:Shell 0.8%