Coder Social home page Coder Social logo

flask-usermanagement's Introduction

Flask - User Management

Getting Started

Local Machine

pip install -r requirements.txt
  • Set PostgreSQL username & password in db.env
  • Start PostgreSQL server
flask --app project db init
flask --app project db migrate
flask --app project db upgrade
python create_database.py
# https://www.sqlite.org/download.html => sqlite-tools-*
sqlite3 .\instance\db.sqlite
sqlite> .tables
user
sqlite> .schema user
CREATE TABLE user (
        id INTEGER NOT NULL,
        email VARCHAR(100),
        password VARCHAR(100),
        name VARCHAR(1000),
        PRIMARY KEY (id),
        UNIQUE (email)
);
flask --app project run --debug

# https://stackoverflow.com/questions/1420719/powershell-setting-an-environment-variable-for-a-single-command-only

When you upgrade any of your database schema

flask --app project db migrate
flask --app project db upgrade

This will create new migrations/version and automatically upgrade your database

Docker Compose

docker compose up --build

Initialize PostgreSQL

$ docker exec -it flask-usermanagement-app-1 /bin/sh
flask --app project db init
flask --app project db migrate
flask --app project db upgrade

Database

Todo

Resources

Tutorial

Flask

Python Database

Database Schema

Database

CSS Framework

Docker

Others

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.