Skip to content

APysnack/ProjectFault

Repository files navigation

ProjectFault

Flask web application developed Summer of 2021

  1. MacOS pyenv installation (ensure Brew is installed)
  • brew update
  • brew install pyenv
  • echo 'eval "$(pyenv init --path)"' >> ~/.zshrc
  • echo 'eval "$(pyenv init -)"' >> ~/.zshrc
  • source ~/.zshrc
  • pyenv --version
  1. cd into root and create a virtual environment:
  • python3 -m venv myenv

  1. Activate environment and install application dependencies:
  • source myenv/bin/activate
  • pip3 install -r requirements.txt
  1. Create local database
  • source myenv/bin/activate
  • python
  • from application import create_app, db, bcrypt
  • from application.models import User
  • app = create_app()
with app.app_context():
  db.create_all()
  hashed_pw = bcrypt.generate_password_hash("ENTER_PASSWORD_HERE").decode("utf-8")
  user = User(username='Namehere', email='[email protected]', password=hashed_pw)
  db.session.add(user)
  db.session.commit()

Verify with User.query.all()

  • exit()
  • python3 run_app.py

About

Flask web application developed Summer of 2021

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published