Skip to content

Problem solving organization website built by pure python-flask, jinja2 template engine and PostgresSQL (PJF)

Notifications You must be signed in to change notification settings

thieu1995/prosolorg-pjf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Video

https://www.youtube.com/watch?v=MwZwr5Tvyxo&list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH

https://www.youtube.com/watch?v=zRwy8gtgJ1A&list=PLillGF-RfqbbbPz6GSEM9hLQObuQjNoj_

Create new virtual environment in python

conda create -n web python=3.6.5

source activate web

conda install -c conda-forge flask, flask-wtf, flask-sqlalchemy, flask-bcrypt, flask-login, pillow , flask-mail

Add conda environment into Pycharm

File -> Settings -> Project Intepreters -> Look at: Project Interpreters --> Show All

--> Click: Plus -> Choice: Conda Environment --> Click: Existing Environment 

--> Choice path to: ../miniconda2/envs/web/bin/python    (3.6.5)

Add environment variable to flask in Pycharm

Choice: Edit configurations (right side - it's blur) --> Click: Plus (left side)
--> Choice: Flask Server --> Rename Flask Server -> Choice Working Directory to: your project directory 
-> Choice Target to: absolute path to your app.py file.

Run first hello world flask

Click run your flask server -> Go to: 127.0.0.1:5000 (or: localhost:5000)  --> You have to see: Hello world

Debug mode in flask

Cause we will change content lots of times, so we don't want to restart flask server after any change. We will use the debug mode by edit configurations --> choice: FLASK_DEBUG

Some functions in Flask

render_template:    Use to render our template
url_for:            Use to find the static url (input is: name of function handler)
flask-wtf:          Use for form 
flask-bcrypt:       Crypt password and check hash password
flask-login :       Help check user login
pillow :            Resize image (large --> small)
flask-mail:         For email send

About

Problem solving organization website built by pure python-flask, jinja2 template engine and PostgresSQL (PJF)

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published