This project is a Python web application built using Flask. The user can log in and out and create/edit articles. An article consists of a title, author, and body of text stored in an Azure SQL Server along with an image that is stored in Azure Blob Storage. You will also implement OAuth2 with Sign in with Microsoft using the msal
library, along with app logging
- Username: admin
- Password: pass
Or, once the MS Login button is implemented, it will automatically log into the admin
account.
Create an SQL Database in Azure that contains a user table, an article table, and data in each table (populated with the scripts provided in the SQL Scripts folder).
- A free Azure account
- A GitHub account
- Python 3.7 or later
- Visual Studio 2019 Community Edition (Free)
- The latest Azure CLI (helpful; not required - all actions can be done in the portal)
All Python dependencies are stored in the requirements.txt file. To install them, using Visual Studio 2019 Community Edition:
- In the Solution Explorer, expand "Python Environments"
- Right click on "Python 3.7 (64-bit) (global default)" and select "Install from requirements.txt"
- Create virtual environment python3 -m pip install virtualenv python3 -m virtualenv venv
./venv source
. /venv/bin/activate
2. Install all the packages:
pip install -r requirements.txt
3. Run the application:
python application.py
- Mac users may need to install
unixodbc
as well as related drivers as shown below:brew install unixodbc
- Check here to add SQL Server drivers for Mac.